# HG changeset patch # User Jason Rumney # Date 973894285 0 # Node ID e0f1d0f3a59d2d976f5b273ed373ecf080f881eb # Parent 262bed8a9ecf6ca1e4d03638903a9862b136153a (w32_encode_char): Handle CP_UNICODE specially. (w32_use_unicode_for_codepage): Use new pseudo-codepages. diff -r 262bed8a9ecf -r e0f1d0f3a59d src/w32term.c --- a/src/w32term.c Fri Nov 10 22:05:50 2000 +0000 +++ b/src/w32term.c Fri Nov 10 22:11:25 2000 +0000 @@ -1411,10 +1411,13 @@ 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 @@ { /* 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))); } @@ -10199,8 +10203,6 @@ void syms_of_w32term () { - Lisp_Object codepage; - staticpro (&w32_display_name_list); w32_display_name_list = Qnil;