On 2011/8/21 23:53, Bram Moolenaar wrote:
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.
I can include this. However, the best solution is probably to make the
compiler not give the warning message.
I still think that the best solution is to remove all those characters,
even encoded in any unicode, since many compilers cannot detect
encoding. Removing these characters could improve the compatibility of
the source code.
Besides, for Microsoft's compiler, the only way for it to regard the
source file as UTF-8 encoded is to add BOM to the source file, which
would not be compatible with gcc earlier than version 4.4.
-- Hong
--
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