Support for Unicode strings

Discussion in 'Ruby' started by RHaus, Jan 11, 2006.

  1. RHaus

    RHaus Guest

    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?

    --
    Posted via http://www.ruby-forum.com/.
     
    RHaus, Jan 11, 2006
    #1
    1. Advertising

  2. On 11/01/06, RHaus <> 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 =3D '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
    --
    Austin Ziegler *
    * Alternate:
     
    Austin Ziegler, Jan 11, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. could ildg
    Replies:
    0
    Views:
    345
    could ildg
    Aug 4, 2005
  2. Robert Kern
    Replies:
    0
    Views:
    479
    Robert Kern
    Aug 4, 2005
  3. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    768
    Malcolm
    Jun 24, 2006
  4. Asterix
    Replies:
    5
    Views:
    722
    Matt Nordhoff
    Aug 31, 2008
  5. fhscobey
    Replies:
    0
    Views:
    237
    fhscobey
    Nov 3, 2005
Loading...

Share This Page