[Mono-devel-list] TextInfo.ANSICodePage
Ben Maurer
bmaurer at ximian.com
Sun Dec 12 17:00:33 EST 2004
On Sun, 2004-12-12 at 16:29 -0500, Miguel de Icaza wrote:
> Hello,
>
> > Right now, TextInfo.ANSICodePage is marked MonoTODO and always returns
> > 0.
> >
> > Would anyone object to the default return value being made `1252', the
> > value used for the invariant culture (and most other cultures as well).
> > This will make code that depends on this working function correctly for
> > most people.
>
> Makes sense.
>
> > Of course, it should still be marked MonoTODO.
>
> Why would it be flagged MonoTODO, if that is the correct codepage?
using System;
using System.Globalization;
class X {
static void Main ()
{
foreach (CultureInfo ci in CultureInfo.GetCultures (CultureTypes.AllCultures))
Console.WriteLine ("{0} -- {1}", ci.Name, ci.TextInfo.ANSICodePage);
}
}
C:\Inetpub\ftproot>t
ar -- 1256
ar-SA -- 1256
ar-IQ -- 1256
ar-EG -- 1256
ar-LY -- 1256
ar-DZ -- 1256
ar-MA -- 1256
ar-TN -- 1256
ar-OM -- 1256
ar-YE -- 1256
ar-SY -- 1256
ar-JO -- 1256
ar-LB -- 1256
ar-KW -- 1256
ar-AE -- 1256
ar-BH -- 1256
ar-QA -- 1256
bg -- 1251
bg-BG -- 1251
ca -- 1252
ca-ES -- 1252
zh-CHS -- 936
zh-TW -- 950
zh-CN -- 936
zh-HK -- 950
zh-SG -- 936
zh-MO -- 950
zh-CHT -- 950
cs -- 1250
cs-CZ -- 1250
da -- 1252
da-DK -- 1252
de -- 1252
de-DE -- 1252
de-CH -- 1252
de-AT -- 1252
de-LU -- 1252
de-LI -- 1252
el -- 1253
el-GR -- 1253
en -- 1252
en-US -- 1252
en-GB -- 1252
en-AU -- 1252
en-CA -- 1252
en-NZ -- 1252
en-IE -- 1252
en-ZA -- 1252
en-JM -- 1252
en-CB -- 1252
en-BZ -- 1252
en-TT -- 1252
en-ZW -- 1252
en-PH -- 1252
es -- 1252
es-MX -- 1252
es-ES -- 1252
es-GT -- 1252
es-CR -- 1252
es-PA -- 1252
es-DO -- 1252
es-VE -- 1252
es-CO -- 1252
es-PE -- 1252
es-AR -- 1252
es-EC -- 1252
es-CL -- 1252
es-UY -- 1252
es-PY -- 1252
es-BO -- 1252
es-SV -- 1252
es-HN -- 1252
es-NI -- 1252
es-PR -- 1252
fi -- 1252
fi-FI -- 1252
fr -- 1252
fr-FR -- 1252
fr-BE -- 1252
fr-CA -- 1252
fr-CH -- 1252
fr-LU -- 1252
fr-MC -- 1252
he -- 1255
he-IL -- 1255
hu -- 1250
hu-HU -- 1250
is -- 1252
is-IS -- 1252
it -- 1252
it-IT -- 1252
it-CH -- 1252
ja -- 932
ja-JP -- 932
ko -- 949
ko-KR -- 949
nl -- 1252
nl-NL -- 1252
nl-BE -- 1252
no -- 1252
nb-NO -- 1252
nn-NO -- 1252
pl -- 1250
pl-PL -- 1250
pt -- 1252
pt-BR -- 1252
pt-PT -- 1252
ro -- 1250
ro-RO -- 1250
ru -- 1251
ru-RU -- 1251
hr -- 1250
hr-HR -- 1250
sr-SP-Latn -- 1250
sr-SP-Cyrl -- 1251
sk -- 1250
sk-SK -- 1250
sq -- 1250
sq-AL -- 1250
sv -- 1252
sv-SE -- 1252
sv-FI -- 1252
th -- 874
th-TH -- 874
tr -- 1254
tr-TR -- 1254
ur -- 1256
ur-PK -- 1256
id -- 1252
id-ID -- 1252
uk -- 1251
uk-UA -- 1251
be -- 1251
be-BY -- 1251
sl -- 1250
sl-SI -- 1250
et -- 1257
et-EE -- 1257
lv -- 1257
lv-LV -- 1257
lt -- 1257
lt-LT -- 1257
fa -- 1256
fa-IR -- 1256
vi -- 1258
vi-VN -- 1258
hy -- 0
hy-AM -- 0
az -- 1254
az-AZ-Latn -- 1254
az-AZ-Cyrl -- 1251
eu -- 1252
eu-ES -- 1252
mk -- 1251
mk-MK -- 1251
af -- 1252
af-ZA -- 1252
ka -- 0
ka-GE -- 0
fo -- 1252
fo-FO -- 1252
hi -- 0
hi-IN -- 0
ms -- 1252
ms-MY -- 1252
ms-BN -- 1252
kk -- 1251
kk-KZ -- 1251
ky -- 1251
ky-KZ -- 1251
sw -- 1252
sw-KE -- 1252
uz -- 1254
uz-UZ-Latn -- 1254
uz-UZ-Cyrl -- 1251
tt -- 1251
tt-RU -- 1251
pa -- 0
pa-IN -- 0
gu -- 0
gu-IN -- 0
ta -- 0
ta-IN -- 0
te -- 0
te-IN -- 0
kn -- 0
kn-IN -- 0
mr -- 0
mr-IN -- 0
sa -- 0
sa-IN -- 0
mn -- 1251
mn-MN -- 1251
gl -- 1252
gl-ES -- 1252
kok -- 0
kok-IN -- 0
syr -- 0
syr-SY -- 0
div -- 0
div-MV -- 0
-- 1252
sr -- 1250
1252 happens to be the number used by:
* The invariant culture
* en-*
* es-*
* fr-*
* pt-*
* A few others
So that covers the biggest audience. However, it is not correct by any
means. Ditto for the other methods.
-- Ben
More information about the Mono-devel-list
mailing list