From: Martin Duerst Date: 2008-12-19T17:18:47+09:00 Subject: [ruby-core:20691] Re: 1.9 character encoding (was: encoding of symbols) At 11:09 08/12/18, danielcavanagh@aanet.com.au wrote: >>> we first add a function >>> to do actual conversions between two encodings based on character, not >>> just reinterpreting the byte values. so c in latin-1 (0x63) would become >>> c >>> in utf-32 (0x00000063). >> >> String#encode does this I believe > >this was just an example. what about if a string had the japanese >character ka in shift jis and was being converted to utf-8. the value >would be entirely different and encode() is not capable of doing this, is >it? Have you ever tried? It's perfectly capable to do this! Why did you think it's not? Regards, Martin. #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp