]> git.eshelyaron.com Git - emacs.git/commitdiff
(w32_encode_char): Handle CP_UNICODE specially.
authorJason Rumney <jasonr@gnu.org>
Fri, 10 Nov 2000 22:11:25 +0000 (22:11 +0000)
committerJason Rumney <jasonr@gnu.org>
Fri, 10 Nov 2000 22:11:25 +0000 (22:11 +0000)
(w32_use_unicode_for_codepage): Use new pseudo-codepages.

src/w32term.c

index 3b64348a6a37b67d31f1d84f6738ab36e1f4b76e..fe2ae116ac1c414af63ff360136761c8a132bafb 100644 (file)
@@ -1411,10 +1411,13 @@ w32_encode_char (c, char2b, font_info, two_byte_p)
       temp[0] = BYTE1 (*char2b);
       temp[1] = BYTE2 (*char2b);
       temp[2] = '\0';
-      if (temp[0])
-        MultiByteToWideChar (codepage, 0, temp, 2, char2b, 1);
-      else
-        MultiByteToWideChar (codepage, 0, temp+1, 1, char2b, 1);
+      if (codepage != CP_UNICODE)
+        {
+          if (temp[0])
+            MultiByteToWideChar (codepage, 0, temp, 2, char2b, 1);
+          else
+            MultiByteToWideChar (codepage, 0, temp+1, 1, char2b, 1);
+        }
       unicode_p = 1;
       *two_byte_p = 1;
     }
@@ -2521,7 +2524,8 @@ w32_use_unicode_for_codepage (codepage)
 {
   /* If the current codepage is supported, use Unicode for output. */
   return (w32_enable_unicode_output
-          && codepage != CP_DEFAULT && IsValidCodePage (codepage));
+          && codepage != CP_8BIT
+          && (codepage == CP_UNICODE || IsValidCodePage (codepage)));
 }
 
 \f
@@ -10199,8 +10203,6 @@ w32_initialize ()
 void
 syms_of_w32term ()
 {
-  Lisp_Object codepage;
-
   staticpro (&w32_display_name_list);
   w32_display_name_list = Qnil;