[#32910] NKF,Kconv — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
[#32913] openの"b"とencoding — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
[#32922] SEGV by regexp match in while loop — Tanaka Akira <akr@...>
Debian GNU/Linux (sarge) の gcc-3.4 を使ってビルドした ruby
[#32935] queue and timeout — Tanaka Akira <akr@...>
timeout で Queue#pop に時間制限をつけた時、タイムアウト時に
まつもと ゆきひろです
[#32940] ripper cannot build on win32 — yukimi_sake <yukimi_sake@...>
雪見酒です。
[#32945] Shift_JIS variants and UTF-16 support — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
中村さん、こんにちは。
まつもと ゆきひろです
成瀬です。
まつもと ゆきひろです
こんにちは、なかむら(う)です。
成瀬です。
こんにちは、なかむら(う)です。
成瀬です。
こんにちは、なかむら(う)です。
まつもと ゆきひろです
[#32946] replica と alias の違い(encoding) — KIMURA Koichi <kimura.koichi@...>
木村です。
[#32987] error with open-uri (instance_eval?) — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
[#32988] Re: [ruby-cvs:22194] Ruby:r14957 (trunk): * encoding.c (rb_enc_init): UTF-{16,32}{BE,LE} are not builtin. — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
[#32992] ASCII is alias of US-ASCII; replica of dummy encoding is not a dummy — "NARUSE, Yui" <naruse@...>
成瀬です。
まつもと ゆきひろです
At 18:13 08/01/09, Yukihiro Matsumoto wrote:
成瀬です。
まつもと ゆきひろです
成瀬です。
まつもと ゆきひろです
なかだです。
まつもと ゆきひろです
[#32996] binmode and ASCII-8BIT — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
[#33069] Re: [ruby-cvs:22244] Ruby:r15007 (trunk): * enc/make_encdb.rb: added. search enc/*.c and make encoding database. — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
まつもと ゆきひろです
[#33076] Encoding.compatible? and dummy encodings — sheepman <sheepman@...>
こんにちは sheepman です。
成瀬です。
まつもと ゆきひろです
[#33078] NEW REPLICA ENCODINGS AND ENCODING ALIASES — "NARUSE, Yui" <naruse@...>
成瀬です。
[#33101] String#valid_encoding? shoud be strict? — Masayoshi Takahashi <maki@...>
高橋征義です。1.9のエンコーディングとString#valid_encoding?について。
[#33139] Bignum#* might invoke GC parallelly? — "Yusuke ENDOH" <mame@...>
遠藤と申します。
[#33156] default script encoding and -K option — sheepman <sheepman@...>
こんばんは sheepman です。
こんにちは、なかむら(う)です。
まつもと ゆきひろです
[#33164] default encoding for Marshal.load — "Shugo Maeda" <shugo@...>
前田です。
まつもと ゆきひろです
[#33185] コンパイルの問題 (r15218) — Martin Duerst <duerst@...>
r15128 当たりで (実はもう少し前から) コンパイルできなくなりました。
[#33218] Re: Ruby1.9String バイト列へのインデックス アクセス — "Hisanori Kiryu" <hkiryu@...>
> ちなみに、byte のではなく bytes の方が妥当だと思います。
[#33224] printf "%0x" — Tanaka Akira <akr@...>
printf の %0x に負の整数を与えると、値によって .. がついたり
[#33226] [PATCH] warnings of enc/trans/utf_16_32.c — Nobuyoshi Nakada <nobu@...>
なかだです。
[#33239] Re: [ruby-cvs:22386] Ruby:r15149 (trunk): * string.c (rb_str_each_char): move forward. — Tanaka Akira <akr@...>
In article <200801210259.m0L2x3CW017171@ci.ruby-lang.org>,
なかだです。
In article <20080121065650.55F60E0662@mail.bc9.jp>,
なかだです。
まつもと ゆきひろです
[#33247] requests to transcode — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
[#33303] Time#strftimeのエンコーディング — rubikitch@...
るびきちです。
まつもと ゆきひろです
なかだです。
西山和広です。
[#33368] summary of script encoding — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
まつもと ゆきひろです
こんにちは、なかむら(う)です。
まつもと ゆきひろです
永井@知能.九工大です.
[#33387] HashからStructを作る — rubikitch@...
るびきちです。
まつもと ゆきひろです
From: Yukihiro Matsumoto <matz@ruby-lang.org>
まつもと ゆきひろです
From: Yukihiro Matsumoto <matz@ruby-lang.org>
まつもと ゆきひろです
From: Yukihiro Matsumoto <matz@ruby-lang.org>
まつもと ゆきひろです
[#33399] regexp match /.../n against to UTF-8 string — Tanaka Akira <akr@...>
以下のように、つけてもいない正規表現の n オプションに関して
[#33400] /#{}/e.encoding — Tanaka Akira <akr@...>
以下のように /#{}/e の encoding が US-ASCII になります。
[#33403] wrapped String#gsub — "Park Ji-In" <tisphie@...>
こんにちは、朴 芝印です。
[#33417] コンパイルの問題 — Martin Duerst <duerst@...>
現在 (r15264 で) コンパイル使用とすると、エラーになります:
At 16:28 08/01/27, you wrote:
[#33433] Win32OLE: set encoding to OLE string — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
成瀬です。
助田です。
こんにちは、なかむら(う)です。
こんにちは、なかむら(う)です。
[#33452] enc/euc_kr.c (euckr_mbc_enc_len) euc_kr.c is also used by CP942 — "NARUSE, Yui" <naruse@...>
成瀬です。
まつもと ゆきひろです
成瀬です。
[#33461] Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — MORITA Hideyuki <h-morita@...>
=1B$B?9ED$H?=3D$7$^$9!#=1B(B
なかだです。
森田です。
なかだです。
森田です。
天野竜太郎と申します。
森田です。
天野です。
森田です。
天野です。
森田です。
天野です。
森田です。
天野です。
[#33488] 現在の script encoding の値を得る方法は? — Hidetoshi NAGAI <nagai@...>
永井@知能.九工大です.
まつもと ゆきひろです
永井@知能.九工大です.
成瀬です。
永井@知能.九工大です.
成瀬です。
永井@知能.九工大です.
成瀬です。
In article <47A00E86.4010701@airemix.com>,
成瀬です。
In article <47A03C9D.2090008@airemix.com>,
In article <87hcgvu1ng.fsf@fsij.org>,
[#33521] nkf の CP932 — Martin Duerst <duerst@...>
成瀬さん、皆さん、こんにちは。
[#33548] block parameter of String#gsub — "NARUSE, Yui" <naruse@...>
成瀬です。
まつもと ゆきひろです
[ruby-dev:33078] NEW REPLICA ENCODINGS AND ENCODING ALIASES
成瀬です。
手元の環境を眺めつつ、色々と replica や alias を設定してみました。現在指
定可能なエンコーディングは以下のとおりです。ISO 8859 シリーズはとりあえ
ずそれっぽいのの replica にしているので間違っていたら教えてください。
(Windows-1251 は なんか間違えた気がする・・・)
"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"
未登録なもののうち、鬼車がサポートしているのは、以下の通り。
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 は KOI8 の replica なのか別物なのかがわかりませんでした。なにか影
響あるのかな。
uk_UA.KOI8-U Ukrainian CODESET=KOI8-U character set
あと以下のエンコーディングがありましたが、これはサポートする必要あるので
すかね?なんかなさそう。
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
ところで、現在 rb_locale_encoding は locale_charmap が nil だと
ASCII-8BIT を返しますが、POSIX 的にいえば nil = C なわけで、US-ASCII を
返すのはどうでしょう。また、未登録の名前が来たときは dummy を返しませんか。
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);
}
--
NARUSE, Yui <naruse@airemix.com>
DBDB A476 FDBD 9450 02CD 0EFC BCE3 C388 472E C1EA