From: Vit Ondruch Date: 2009-09-04T23:08:31+09:00 Subject: [ruby-core:25360] [Bug #2043] incompatible character encodings Bug #2043: incompatible character encodings http://redmine.ruby-lang.org/issues/show/2043 Author: Vit Ondruch Status: Open, Priority: Normal ruby -v: ruby 1.9.2dev (2009-09-02) [i386-mswin32_90] Why the following example fails with the "Encoding::CompatibilityError: incompatible character encodings: Windows-1250 and UTF-8" exception? s = "\u017Elu\u0165ou\u010dk\u00fd" a = s.encode 'cp1250' b = s.encode 'utf-8' c = a + b I would expect that if the strings are not in the same encoding, that Ruby will do everything they can to satisfy me, but they just tries if there is possible conversion to ASCII otherwise exception is fired. This is really annoying behavior. Have you considered to allow such string merge? ---------------------------------------- http://redmine.ruby-lang.org