e$B@.@%$G$9!#e(B
e$B<j85$N4D6-$rD/$a$D$D!"?’!9$He(B replica e$B$de(B alias
e$B$r@Dj$7$F$$^$7$?!#8=:_;Xe(B
e$BDj2DG=$J%(%s%3!<%G%#%s%0$O0J2<$N$H$*$j$G$9!#e(BISO 8859
e$B%7%j!<%:$O$H$j$"$(e(B
e$B$:$=$l$C$]$$$N$Ne(B replica
e$B$K$7$F$$$k$N$G4V0c$C$F$$$?$i65$($F$/$@$5$$!#e(B
e$B!Je(BWindows-1251 e$B$Oe(B e$B$J$s$+4V0c$($?5$$,$9$k!&!&!&!Ke(B
“ASCII” is original encoding
“EUC-JP” is original encoding
“ISO-8859-1” is original encoding
“ISO-8859-10” is original encoding
“ISO-8859-11” is original encoding
“ISO-8859-13” is original encoding
“ISO-8859-14” is original encoding
“ISO-8859-15” is original encoding
“ISO-8859-16” is original encoding
“ISO-8859-2” is original encoding
“ISO-8859-3” is original encoding
“ISO-8859-4” is original encoding
“ISO-8859-5” is original encoding
“ISO-8859-6” is original encoding
“ISO-8859-7” is original encoding
“ISO-8859-8” is original encoding
“ISO-8859-9” is original encoding
“Shift_JIS” is original encoding
“US-ASCII” is original encoding
“UTF-8” is original encoding
“UTF-16BE” is original encoding
“UTF-16LE” is original encoding
“UTF-32BE” is original encoding
“UTF-32LE” is original encoding
"“Windows-1255” is replica of “ISO-8859-8”
“Windows-1256” is replica of “ISO-8859-6”
“Windows-1257” is replica of “ISO-8859-4”
“Windows-874” is replica of “ISO-8859-11”
“CP51932” is replica of “EUC-JP”
“eucJP-ms” is replica of “EUC-JP”
“Windows-31J” is replica of “Shift_JIS”
“Windows-1251” is replica of “ISO-8859-5”
“Windowws-1250” is replica of “ISO-8859-2”
“Windows-1252” is replica of “ISO-8859-1”
“Windows-1253” is replica of “ISO-8859-7”
“Windows-1254” is replica of “ISO-8859-9”
“CP932” is alias of “Windows-31J”
“ISO8859-6” is alias of “ISO-8859-6”
“ISO8859-14” is alias of “ISO-8859-14”
“CP1252” is alias of “Windows-1252”
“SJIS” is alias of “Shift_JIS”
“CP1253” is alias of “Windows-1253”
“ISO8859-7” is alias of “ISO-8859-7”
“ISO8859-15” is alias of “ISO-8859-15”
“BINARY” is alias of “ASCII-8BIT”
“646” is alias of “US-ASCII”
“CP1254” is alias of “Windows-1254”
“ISO8859-8” is alias of “ISO-8859-8”
“ISO8859-16” is alias of “ISO-8859-16”
“ISO8859-9” is alias of “ISO-8859-9”
“CP1255” is alias of “Windows-1255”
“eucJP” is alias of “EUC-JP”
“ANSI_X3.4-1986” is alias of “US-ASCII”
“CP1256” is alias of “Windows-1256”
“CP1257” is alias of “Windows-1257”
“ASCII” is alias of “US-ASCII”
“ISO8859-1” is alias of “ISO-8859-1”
“csWindows31J” is alias of “Windows-31J”
“ISO8859-2” is alias of “ISO-8859-2”
“ISO8859-10” is alias of “ISO-8859-10”
“ISO8859-3” is alias of “ISO-8859-3”
“CP874” is alias of “ISO-8859-11”
“ISO8859-11” is alias of “ISO-8859-11”
“euc-jp-ms” is alias of “EUC-JP”
“ISO8859-4” is alias of “ISO-8859-4”
“CP1250” is alias of “Windows-1250”
“CP1251” is alias of “Windows-1251”
“ISO8859-5” is alias of “ISO-8859-5”
“ISO8859-13” is alias of “ISO-8859-13”
e$BL$EPO?$J$b$N$N$&$A!"54<V$,%5%]!<%H$7$F$$$k$N$O!"0J2<$NDL$j!#e(B
bg_BG.CP1251 Bulgarian Cyrillic character set (CP1251), CODESET=CP1251
ko_KR.eucKR 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080 CODESET=eucKR
ru_RU.KOI8-R Russian CODESET=KOI8-R
zh_CN.GB18030 CODESET=GB18030
zh_CN.eucCN 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080 CODESET=eucCN
zh_TW.BIG5 CODESET=BIG5
zh_TW.eucTW CODESET=eucTW
KOI8-U e$B$Oe(B KOI8 e$B$Ne(B replica
e$B$J$N$+JLJ*$J$N$+$,$o$+$j$^$;$s$G$7$?!#$J$K$+1Fe(B
e$B6A$"$k$N$+$J!#e(B
uk_UA.KOI8-U Ukrainian CODESET=KOI8-U character set
e$B$"$H0J2<$N%(%s%3!<%G%#%s%0$,$"$j$^$7$?$,!"$3$l$O%5%]!<%H$9$kI,MW$"$k$N$Ge(B
e$B$9$+$M!)$J$s$+$J$5$=$&!#e(B
ru_RU.CP866 Russian Alternative charset, CODESET=CP866
kk_KZ.PT154 PT154 character set,CODESET=PT154
hy_AM.ARMSCII-8 Armenian ARMSCII-8 character set, CODESET=ARMSCII-8
ru_RU.CP866 Russian Alternative charset, CODESET=CP866
e$B$H$3$m$G!"8=:_e(B rb_locale_encoding e$B$Oe(B locale_charmap e$B$,e(B
nil e$B$@$He(B
ASCII-8BIT e$B$rJV$7$^$9$,!"e(BPOSIX e$BE*$K$$$($Pe(B nil = C
e$B$J$o$1$G!"e(BUS-ASCII e$B$re(B
e$BJV$9$N$O$I$&$G$7$g$&!#$^$?!"L$EPO?$NL>A0$,Mh$?$H$-$Oe(B dummy
e$B$rJV$7$^$;$s$+!#e(B
Index: encoding.c
— encoding.c (revision 15025)
+++ encoding.c (working copy)
@@ -872,13 +872,14 @@ rb_locale_encoding(void)
{
VALUE charmap = rb_locale_charmap(rb_cEncoding);
int idx;
- char *name;
- if (NIL_P(charmap))
-
return rb_ascii8bit_encoding();
- if (NIL_P(charmap)) name = “US-ASCII”;
- else name = StringValueCStr(charmap)
- idx = rb_enc_find_index(StringValueCStr(charmap));
- idx = rb_enc_find_index(name);
if (idx < 0)
-
return rb_ascii8bit_encoding();
-
idx = rb_define_dummy_encoding(name);
return rb_enc_from_index(idx);
}