[Mono-dev] [PATCH] Use UTF-8 encoding for source files in mcs tree and for ChangeLogs
atsushi at ximian.com
Wed Aug 16 10:17:03 EDT 2006
Kornél Pál wrote:
> Note that I posted the patch for mcs tree uncompressed but it was too
> large and hasn't been approved to the list yet so I resend it zipped.
> Currently source files (*.cs; *.vb) use different encodings:
> - ASCII
> - Latin 1
> - UTF-8 (without BOM)
> - UTF-8 (with BOM)
> The same is true for ChangeLogs but there were mixed encodings as well.
> Our mcs compile doen't recongnize UTF-8 without BOM so those files are
> incorrectly compiled if they were in Latin 1.
> All of our source files should use the same encoding to be consistent that
> makes code more maintainable as well. UTF-8 without BOM seems to be a good
> solution as it provides support for every possible Unicode character so
> is a long-term solution for the problem.
> I used the attached Latin1ToUtf8.cs to convert the encoding of source files
> but I revised each modified character to make sure that the file was
> converted from the right encoding to UTF-8.
> Additional modifications:
> mcs/build/config-default.make: Use UTF-8 as the default encoding for
> mcs/class/Managed.Windows.Forms/Makefile: Removed CODEPAGE as UTF-8 is the
> mcs/class/Microsoft.VisualBasic/Makefile: Removed CODEPAGE as UTF-8 is the
> Replaced unnecessary (same visual character) non-ASCII characters with
> characters in:
> Note that removig BOM and the above replacements resulted in 129 more ASCII
> files that were non-ASCII because of BOM or non-ASCII characters.
> I think that there are no side effects of these patches but comments are
> Please review and approve the patches.
Thanks a bunch for the patch! I attached the result of my audit
as "only meaningful code changes" i.e. I believe I read the
entire changes ;-)
If no objection in reasonable days, let's check the patch in.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Mono-devel-list