[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/mac.c
From: |
Steven Tamm |
Subject: |
[Emacs-diffs] Changes to emacs/src/mac.c |
Date: |
Fri, 03 Dec 2004 12:06:38 -0500 |
Index: emacs/src/mac.c
diff -c emacs/src/mac.c:1.23 emacs/src/mac.c:1.24
*** emacs/src/mac.c:1.23 Sun Oct 10 16:56:21 2004
--- emacs/src/mac.c Fri Dec 3 17:00:11 2004
***************
*** 262,267 ****
--- 262,283 ----
return 1;
}
+ #if TARGET_API_MAC_CARBON
+ CFStringRef
+ cfstring_create_with_utf8_cstring (c_str)
+ const char *c_str;
+ {
+ CFStringRef str;
+
+ str = CFStringCreateWithCString (NULL, c_str, kCFStringEncodingUTF8);
+ if (str == NULL)
+ /* Failed to interpret as UTF 8. Fall back on Mac Roman. */
+ str = CFStringCreateWithCString (NULL, c_str, kCFStringEncodingMacRoman);
+
+ return str;
+ }
+ #endif
+
#ifndef MAC_OSX
/* The following functions with "sys_" prefix are stubs to Unix
- [Emacs-diffs] Changes to emacs/src/mac.c,
Steven Tamm <=