From: Martin Duerst Date: 2008-12-14T18:12:43+09:00 Subject: [ruby-core:20548] Re: 1.9 character encoding (was: encoding ofsymbols) At 16:31 08/12/14, Michael Selig wrote: >On Sun, 14 Dec 2008 17:26:10 +1100, Daniel Luz wrote: >> I only knew of ASCII-compatibility. Are there other cases? ISO-8859-1 >> and Windows-1252 (a superset) at least are not compatible: >> >> i = "cafテゥ".encode("iso-8859-1") >> w = "cafテゥ".encode("windows-1252") >> i == w # => false >> i + w # Encoding::CompatibilityError >> w + i # Encoding::CompatibilityError > >I think this might be a bug. In Ruby, as in most other practical uses that I know of, iso-8859-1 (as well as all the other iso-8895-x) includes control codes in the range 0x80-0x9F. ISO-8859-1 and Windows-1252 would be compatible if you ignore these control codes, but we can't just ignore them. Regards, Martin. #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp