Hong Xu wrote:

> 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.

In my opinion the compiler should not complain about characters in
comments.

> 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.

Right, we will keep the source code in latin1, there is no doubt about
that.  I have always had the goal to support most C compilers, old and
new.

-- 
   [The rest of the ARMY stand around looking at a loss.]
INSPECTOR END OF FILM: (picks up megaphone) All right!  Clear off!  Go on!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
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

Reply via email to