|
ご参考
.NET 8.0 のコンソールアプリ
using System.Text;
namespace ConsoleApp4
{
internal class Program
{
static void Main(string[] args)
{
var encode1 = Encoding.GetEncoding("utf-32");
Console.WriteLine(encode1.ToString());
Console.WriteLine("サポートしているすべてのエンコーディングを取得する");
var eis = System.Text.Encoding.GetEncodings();
foreach (System.Text.EncodingInfo ei in eis)
{
Console.WriteLine("{0}\t{1}\t{2}", ei.DisplayName, ei.CodePage, ei.Name);
}
Console.WriteLine("-----------------------------");
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
var encode2 = Encoding.GetEncoding("shift_jis");
Console.WriteLine(encode2.ToString());
Console.WriteLine("サポートしているすべてのエンコーディングを取得する");
eis = System.Text.Encoding.GetEncodings();
foreach (System.Text.EncodingInfo ei in eis)
{
Console.WriteLine("{0}\t{1}\t{2}", ei.DisplayName, ei.CodePage, ei.Name);
}
}
}
}
/* 結果
System.Text.UTF32Encoding
サポートしているすべてのエンコーディングを取得する
Unicode 1200 utf-16
Unicode (Big-Endian) 1201 utf-16BE
Unicode (UTF-32) 12000 utf-32
Unicode (UTF-32 Big-Endian) 12001 utf-32BE
US-ASCII 20127 us-ascii
Western European (ISO) 28591 iso-8859-1
Unicode (UTF-8) 65001 utf-8
-----------------------------
System.Text.DBCSCodePageEncoding
サポートしているすべてのエンコーディングを取得する
Japanese (Shift-JIS) 932 shift_jis
Portuguese (DOS) 860 IBM860
Icelandic (DOS) 861 ibm861
IBM EBCDIC (Cyrillic Russian) 20880 IBM880
Hebrew (DOS) 862 DOS-862
French Canadian (DOS) 863 IBM863
Chinese Simplified (GB2312) 936 gb2312
Arabic (864) 864 IBM864
Nordic (DOS) 865 IBM865
Cyrillic (DOS) 866 cp866
Cyrillic (KOI8-U) 21866 koi8-u
IBM EBCDIC (US-Canada) 37 IBM037
Greek, Modern (DOS) 869 ibm869
IBM EBCDIC (International) 500 IBM500
Icelandic (Mac) 10079 x-mac-icelandic
IBM EBCDIC (US-Canada-Euro) 1140 IBM01140
IBM EBCDIC (Germany-Euro) 1141 IBM01141
IBM EBCDIC (Denmark-Norway-Euro) 1142 IBM01142
IBM EBCDIC (Germany) 20273 IBM273
IBM EBCDIC (Finland-Sweden-Euro) 1143 IBM01143
IBM EBCDIC (Italy-Euro) 1144 IBM01144
IBM EBCDIC (Spain-Euro) 1145 IBM01145
Central European (Windows) 1250 windows-1250
IBM EBCDIC (UK-Euro) 1146 IBM01146
Cyrillic (Windows) 1251 windows-1251
IBM EBCDIC (France-Euro) 1147 IBM01147
Western European (Mac) 10000 macintosh
Western European (Windows) 1252 windows-1252
Arabic (DOS) 720 DOS-720
IBM EBCDIC (Denmark-Norway) 20277 IBM277
IBM EBCDIC (International-Euro) 1148 IBM01148
Japanese (Mac) 10001 x-mac-japanese
Greek (Windows) 1253 windows-1253
OEM United States 437 IBM437
IBM EBCDIC (Finland-Sweden) 20278 IBM278
IBM EBCDIC (Icelandic-Euro) 1149 IBM01149
Chinese Traditional (Mac) 10002 x-mac-chinesetrad
Turkish (Windows) 1254 windows-1254
Hebrew (Windows) 1255 windows-1255
Korean (Johab) 1361 Johab
Arabic (Windows) 1256 windows-1256
Arabic (Mac) 10004 x-mac-arabic
Baltic (Windows) 1257 windows-1257
Hebrew (Mac) 10005 x-mac-hebrew
Vietnamese (Windows) 1258 windows-1258
Greek (Mac) 10006 x-mac-greek
Cyrillic (Mac) 10007 x-mac-cyrillic
IBM Latin-1 20924 IBM00924
Central European (ISO) 28592 iso-8859-2
Latin 3 (ISO) 28593 iso-8859-3
Baltic (ISO) 28594 iso-8859-4
Cyrillic (ISO) 28595 iso-8859-5
Arabic (ISO) 28596 iso-8859-6
IBM EBCDIC (Multilingual Latin-2) 870 IBM870
Greek (ISO) 28597 iso-8859-7
Hebrew (ISO-Visual) 28598 iso-8859-8
Turkish (ISO) 28599 iso-8859-9
Turkish (Mac) 10081 x-mac-turkish
Croatian (Mac) 10082 x-mac-croatian
Thai (Windows) 874 windows-874
IBM EBCDIC (Greek Modern) 875 cp875
IBM EBCDIC (Arabic) 20420 IBM420
Korean 949 ks_c_5601-1987
IBM EBCDIC (Greek) 20423 IBM423
IBM EBCDIC (Hebrew) 20424 IBM424
IBM EBCDIC (Italy) 20280 IBM280
IBM Latin-1 1047 IBM01047
IBM EBCDIC (Spain) 20284 IBM284
IBM EBCDIC (UK) 20285 IBM285
Romanian (Mac) 10010 x-mac-romanian
Japanese (JIS 0208-1990 and 0212-1990) 20932 EUC-JP
Ukrainian (Mac) 10017 x-mac-ukrainian
Europa 29001 x-Europa
Greek (DOS) 737 ibm737
Western European (IA5) 20105 x-IA5
Chinese Traditional (Big5) 950 big5
Chinese Simplified (GB2312-80) 20936 x-cp20936
German (IA5) 20106 x-IA5-German
Swedish (IA5) 20107 x-IA5-Swedish
Norwegian (IA5) 20108 x-IA5-Norwegian
Cyrillic (KOI8-R) 20866 koi8-r
Baltic (DOS) 775 ibm775
Estonian (ISO) 28603 iso-8859-13
IBM EBCDIC (Japanese katakana) 20290 IBM290
Latin 9 (ISO) 28605 iso-8859-15
Chinese Traditional (CNS) 20000 x-Chinese-CNS
Arabic (ASMO 708) 708 ASMO-708
IBM EBCDIC (France) 20297 IBM297
Thai (Mac) 10021 x-mac-thai
TCA Taiwan 20001 x-cp20001
IBM EBCDIC (Turkish) 20905 IBM905
Chinese Traditional (Eten) 20002 x-Chinese-Eten
IBM EBCDIC (Korean Extended) 20833 x-ebcdic-koreanextended
IBM5550 Taiwan 20003 x-cp20003
TeleText Taiwan 20004 x-cp20004
Wang Taiwan 20005 x-cp20005
Western European (DOS) 850 ibm850
IBM EBCDIC (Thai) 20838 IBM-Thai
Central European (DOS) 852 ibm852
IBM EBCDIC (Icelandic) 20871 IBM871
Central European (Mac) 10029 x-mac-ce
OEM Cyrillic 855 IBM855
IBM EBCDIC (Cyrillic Serbian-Bulgarian) 21025 cp1025
Korean Wansung 20949 x-cp20949
Turkish (DOS) 857 ibm857
OEM Multilingual Latin I 858 IBM00858
T.61 20261 x-cp20261
IBM EBCDIC (Turkish Latin-5) 1026 IBM1026
ISO-6937 20269 x-cp20269
Unicode 1200 utf-16
Unicode (Big-Endian) 1201 utf-16BE
Unicode (UTF-32) 12000 utf-32
Unicode (UTF-32 Big-Endian) 12001 utf-32BE
US-ASCII 20127 us-ascii
Western European (ISO) 28591 iso-8859-1
Unicode (UTF-8) 65001 utf-8
*/
|