0-3G-05 贾延平 wrote:
> Firest of all, sorry for my poor englishJ
> 
> These days, I tried Jruby with chinese. And I have a question:
> 
> Why don’t using UTF-8 for Ruby internal use, Especially with �CKu option?
> 
> We can
> 
> 1, Read ruby script file using the file’s encoding instead of read RAW data.
> 
> 2, Strings first convert to java’s UTF16 when read from file and then 
> convert to UTF8 bytes for RubyString
> 
> 3. so, in Ruby Strings will be implement by bytes with encoding UTF8
> 
>  
> 
> Because UTF8 is compatible with ASCII, ruby script file write in English 
> is OK.

你好,贾延平!

Internally, Ruby strings (even in JRuby) are just a collection of bytes.
If you specify
-Ku they will be UTF-8 internally by default. If you call a Java API
that returns strings,
we'll convert that string into bytes as UTF-8. Is there a specific
problem you're seeing?

我不忍情你的���}。

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to