diff options
| author | Jason Rumney | 2000-11-10 22:11:25 +0000 |
|---|---|---|
| committer | Jason Rumney | 2000-11-10 22:11:25 +0000 |
| commit | 02f593f3d0c929553d017f6b2c25bdffd6db80dd (patch) | |
| tree | 7babc91254ceb8519710a798ae0160252026567c /src/w32term.c | |
| parent | 15fa6efbcfebb23b76d62154e3acba7b2cc8a274 (diff) | |
| download | emacs-02f593f3d0c929553d017f6b2c25bdffd6db80dd.tar.gz emacs-02f593f3d0c929553d017f6b2c25bdffd6db80dd.zip | |
(w32_encode_char): Handle CP_UNICODE specially.
(w32_use_unicode_for_codepage): Use new pseudo-codepages.
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/w32term.c b/src/w32term.c index 3b64348a6a3..fe2ae116ac1 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -1411,10 +1411,13 @@ w32_encode_char (c, char2b, font_info, two_byte_p) | |||
| 1411 | temp[0] = BYTE1 (*char2b); | 1411 | temp[0] = BYTE1 (*char2b); |
| 1412 | temp[1] = BYTE2 (*char2b); | 1412 | temp[1] = BYTE2 (*char2b); |
| 1413 | temp[2] = '\0'; | 1413 | temp[2] = '\0'; |
| 1414 | if (temp[0]) | 1414 | if (codepage != CP_UNICODE) |
| 1415 | MultiByteToWideChar (codepage, 0, temp, 2, char2b, 1); | 1415 | { |
| 1416 | else | 1416 | if (temp[0]) |
| 1417 | MultiByteToWideChar (codepage, 0, temp+1, 1, char2b, 1); | 1417 | MultiByteToWideChar (codepage, 0, temp, 2, char2b, 1); |
| 1418 | else | ||
| 1419 | MultiByteToWideChar (codepage, 0, temp+1, 1, char2b, 1); | ||
| 1420 | } | ||
| 1418 | unicode_p = 1; | 1421 | unicode_p = 1; |
| 1419 | *two_byte_p = 1; | 1422 | *two_byte_p = 1; |
| 1420 | } | 1423 | } |
| @@ -2521,7 +2524,8 @@ w32_use_unicode_for_codepage (codepage) | |||
| 2521 | { | 2524 | { |
| 2522 | /* If the current codepage is supported, use Unicode for output. */ | 2525 | /* If the current codepage is supported, use Unicode for output. */ |
| 2523 | return (w32_enable_unicode_output | 2526 | return (w32_enable_unicode_output |
| 2524 | && codepage != CP_DEFAULT && IsValidCodePage (codepage)); | 2527 | && codepage != CP_8BIT |
| 2528 | && (codepage == CP_UNICODE || IsValidCodePage (codepage))); | ||
| 2525 | } | 2529 | } |
| 2526 | 2530 | ||
| 2527 | 2531 | ||
| @@ -10199,8 +10203,6 @@ w32_initialize () | |||
| 10199 | void | 10203 | void |
| 10200 | syms_of_w32term () | 10204 | syms_of_w32term () |
| 10201 | { | 10205 | { |
| 10202 | Lisp_Object codepage; | ||
| 10203 | |||
| 10204 | staticpro (&w32_display_name_list); | 10206 | staticpro (&w32_display_name_list); |
| 10205 | w32_display_name_list = Qnil; | 10207 | w32_display_name_list = Qnil; |
| 10206 | 10208 | ||