From: Yukihiro Matsumoto Date: 2009-06-25T18:06:39+09:00 Subject: [ruby-core:24030] Re: [Bug #1681] Integer#chr Should Infer Encoding of Given Codepoint Hi, In message "Re: [ruby-core:24001] Re: [Bug #1681] Integer#chr Should Infer Encoding of Given Codepoint" on Wed, 24 Jun 2009 09:54:06 +0900, Run Paint Run Run writes: | |>> This seems needlessly verbose given that Ruby already knows |>> that my source encoding is UTF-8. |> |> It's irrelevant to source encoding. �A possiblity would be |> Encoding.default_internal? | |Indeed; my mistake. :-) Source encoding may be different from default internal encoding. Since codepoint _number_ does not contain any encoding information, there's information loss. I am not sure it is OK to use possibly wrong encoding information (default internal), even as a default. I'd like to hear opinion from others. matz.