Best practice to handle non-english characters is ruby?

Posted by ragnarius on Stack Overflow See other posts from Stack Overflow or by ragnarius
Published on 2010-03-27T18:25:10Z Indexed on 2010/03/27 18:33 UTC
Read the original article Hit count: 317

Filed under:
|
|

Hi! My program file is encoded in utf-8 so "abc".length==3 but "åäö".length==6. I realize that å,ä,ö, are stored as two bytes in utf-8, and that a ruby String is a sequence of bytes (not characters), but it is annoying! Is there a best practice to work around this problem?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about character-encoding