I believe that's not the right way to solve problems of 1% by
introducing problems to 99% of everyone else.
Why not make the utf-8 default and other encoding possible?
···
--
Posted via http://www.ruby-forum.com/.
I believe that's not the right way to solve problems of 1% by
introducing problems to 99% of everyone else.
Why not make the utf-8 default and other encoding possible?
--
Posted via http://www.ruby-forum.com/.
That sounds like a good argument. Except…from where do you get your 1% number? Japan is roughly 2% of the world population, but likely a huge portion of Ruby users.
On Aug 17, 2011, at 11:54 AM, Alexey Petrushin <axyd80@gmail.com> wrote:
I believe that's not the right way to solve problems of 1% by
introducing problems to 99% of everyone else.
I did some googling and turns out I was right. Here's an article I
found: Ruby 1.9 Encodings: A Primer and the Solution for Rails
- let me cite the relevant part:
Other languages, such as Java and Python, solve this problem by encodeing every String that enters the language as UTF-8 (or UTF-16). [...]
However, this solution does not work very well for the Japanese community. For a variety of complicated reasons, Japanese encoding, such as SHIFT-JIS, are not considered to losslessly encode into UTF-8. As a result, Ruby has a policy of not attempting to simply encode any inbound String into UTF-8.
The article itself is actually a pretty interesting read.
Also, Alexey, that 1% you pulled out of nowhere is certainly wrong.
Just look at, say, the official Ruby language issues tracker -
Issues - Ruby Issue Tracking System - and count issues written in
Japanese, or by Japanese people. There aren't many here, since this is
an English-language list.
-- Matma Rex
Bartosz Dziewoński wrote in post #1017168:
- let me cite the relevant part:
Other languages, such as Java and Python, solve this problem by encodeing every
String that enters the language as UTF-8 (or UTF-16). [...]
However, this solution does not work very well for the Japanese community. For
a
variety of complicated reasons, Japanese encoding, such as SHIFT-JIS,
are not
considered to losslessly encode into UTF-8. As a result, Ruby has a
policy of not
attempting to simply encode any inbound String into UTF-8.
Except that even ruby 1.9 cannot handle SHIFT-JIS (it's a stateful
encoding)
--
Posted via http://www.ruby-forum.com/\.