From: Nobuyoshi Nakada Date: 2008-10-27T21:07:16+09:00 Subject: [ruby-core:19546] Re: String literal encoding (Was: Default source encoding (Was: [Bug #680] csv.rb: CSV.parse is toolate when encoding is mismatch)) Hi, At Mon, 27 Oct 2008 19:17:45 +0900, Michael Selig wrote in [ruby-core:19540]: > But my original point is that 1.8 scripts exist which contain multibyte > characters (eg UTF-8) which work fine under 1.8 without-K, but will fail > under 1.9 unless a magic comment or -K is provided. It just seemed working by chance. > > But it's very ambiguous and dangerous to imply encodings. We > > can't trust locale for this purpose, at least. > > It's a trade-off between that and backward compatibility. I think the > "danger" is not high and it gives backward compatibility, so my vote would > be to use it. And it will suddenly crash or behave weirdly by moving other locales. Anyway, I think I understand the needs to specify source encoding without magic comments. Is the option for that purpose an acceptable solution? -- Nobu Nakada