[Mono-dev] Re: [Mono-devel-list] mcs patch for default encoding
Marek Safar
marek.safar at seznam.cz
Mon Aug 22 04:30:43 EDT 2005
Hello Eno,
>Any comments on this patch? If we leave this problem as is, most
>of native-language dependent applications won't compile fine
>(as I experienced on many Japanese sources).
>
>
Probably, we will have to fix this bug first.
http://bugzilla.ximian.com/show_bug.cgi?id=73086
Marek
>Atsushi Eno
>
>Atsushi Eno wrote:
>
>
>>Hello,
>>
>>I've attached a fix for mcs to not use Latin1 encoding everywhere.
>>I think it should be default encoding of current culture (for
>>example the codepage is 932 on my Japanese environment, neither
>>28591 nor 1252).
>>
>>But in case we really don't have the corresponding encoding that
>>CultureInfo.CurrentCulture.TextInfo indicates (it should be
>>supplied though), we should use culture-independent encoding, so
>>I think it should be utf-8, instead of iso-8859-1.
>>
>>Atsushi Eno
>>
>>
>>------------------------------------------------------------------------
>>
>>Index: driver.cs
>>===================================================================
>>--- driver.cs (revision 47877)
>>+++ driver.cs (working copy)
>>@@ -1374,10 +1374,10 @@
>> bool parsing_options = true;
>>
>> try {
>>- encoding = Encoding.GetEncoding (28591);
>>+ encoding = Encoding.GetEncoding (CultureInfo.CurrentCulture.TextInfo.ANSICodePage);
>> } catch {
>> Console.WriteLine ("Error: could not load encoding 28591, trying 1252");
>>- encoding = Encoding.GetEncoding (1252);
>>+ encoding = Encoding.UTF8;
>> }
>>
>> references = new ArrayList ();
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>Mono-devel-list mailing list
>>Mono-devel-list at lists.ximian.com
>>http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>
>_______________________________________________
>Mono-devel-list mailing list
>Mono-devel-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>
More information about the Mono-devel-list
mailing list