emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/mac.c [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/mac.c [emacs-unicode-2]
Date: Wed, 08 Dec 2004 00:47:45 -0500

Index: emacs/src/mac.c
diff -c emacs/src/mac.c:1.16.4.3 emacs/src/mac.c:1.16.4.4
*** emacs/src/mac.c:1.16.4.3    Thu Oct 14 08:49:53 2004
--- emacs/src/mac.c     Wed Dec  8 05:02:18 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]