When build vim with MSVC, there is always a warning message like this
when compiling each source file:

x:\path\to\source\ascii.h : warning C4819: The file contains a character
that cannot be represented in the current code page (936). Save the
file in Unicode format to prevent data loss

The attached patch will fix this warning partially(for ascii.h and spell.c), and I think that we should
avoid using characters whose ascii code is greater than 128 in C source
file. Warnings still exist in charset.c and digraph.c, and I see there are many characters that could lead to this warning, so I have not fixed this problem there.

Regards,
Hong Xu

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff -r 7b50afd31037 src/ascii.h
--- a/src/ascii.h       Fri Aug 19 22:29:02 2011 +0200
+++ b/src/ascii.h       Sun Aug 21 11:51:18 2011 +0800
@@ -123,7 +123,7 @@
 #define DCS            0x90    /* Device Control String */
 #define STERM          0x9c    /* String Terminator */
 
-#define POUND          '£'
+#define POUND          '\xA3'
 
 #define CTRL_F_STR     "\056"
 #define CTRL_H_STR     "\026"
diff -r 7b50afd31037 src/spell.c
--- a/src/spell.c       Fri Aug 19 22:29:02 2011 +0200
+++ b/src/spell.c       Sun Aug 21 11:51:18 2011 +0800
@@ -11197,7 +11197,7 @@
            c = *s++;
 
 #ifdef FEAT_MBYTE
-       /* We only change ß to SS when we are certain latin1 is used.  It
+       /* We only change 0xdf to SS when we are certain latin1 is used.  It
         * would cause weird errors in other 8-bit encodings. */
        if (enc_latin1like && c == 0xdf)
        {

Reply via email to