From: 7stud -- Date: 2007-11-04T07:38:50+09:00 Subject: Re: Unicode illegal characters problem Axel Etzold wrote: >>Jonathan Hudson wrote: >> >> I believe that's a "feature" of ruby iconv. >> >> $ echo caf� | iconv -f UTF-8 -t ASCII//TRANSLIT >> cafe >> >> while >> >> s="caf�" >> ic_translit = Iconv.new('ASCII//TRANSLIT', 'UTF-8') >> puts ic_translit.iconv(s) >> => caf? > Dear Jonathan, > >> I believe that's a "feature" of ruby iconv. > > thanks for your clarifications! > How does that clarify things for you? I read the other thread, and that doesn't clarify anything for me. Are you simply interpreting Jonathan Hudson's statement to mean the other thread is wrong? Also, I don't think it is very helpful to include every possible unicode statement you can think of in an attempt solve unicode problems. For instance, this line: $KCODE = 'u' Why are you including that line in your program? According to Ruby Way(2nd), p. 141, "...$KCODE...determines the behavior of many core methods that manipulate strings. " However, in the code you posted, as far as I can tell, you aren't calling any methods where the $KCODE changes the way they work. Do you just include that line anytime you are dealing with unicode, or did you include it for some specific reason? Thanks. -- Posted via http://www.ruby-forum.com/.