Forum: Ruby Support for Unicode strings

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
RHaus (Guest)
on 2006-01-11 15:04
I am rather new to ruby but was considering to use it for my next
project. However, support for Unicode strings would be essential. This
includes the correct handling of unicode strings in regular expressions,
in IO operations etc. How is this best done in Ruby?
Austin Z. (Guest)
on 2006-01-11 17:06
(Received via mailing list)
On 11/01/06, RHaus <removed_email_address@domain.invalid> wrote:
> I am rather new to ruby but was considering to use it for my next
> project. However, support for Unicode strings would be essential. This
> includes the correct handling of unicode strings in regular expressions,
> in IO operations etc. How is this best done in Ruby?

Please do a search on this. The answers to these questions have been
given a dozen times. A quick summary:

1. Ruby Strings are byte vectors. Eith $KCODE = 'u', you get some
additional capabilities with Regexen for Unicode (UTF-8).
2. As long as you're not actually looking for foo[0] to give you the
first character (Unicode or otherwise), you'll be okay.

Ruby does just fine with most applications of Unicode. Ruby 2.0 will
include m17n Strings that will make it even better, not just for
Unicode.

-austin
This topic is locked and can not be replied to.