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. Advertisements

  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. Advertisements

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. Robert Mark Bram
    Replies:
    0
    Views:
    4,364
    Robert Mark Bram
    Sep 28, 2003
  2. could ildg
    Replies:
    0
    Views:
    431
    could ildg
    Aug 4, 2005
  3. ygao

    unicode wrap unicode object?

    ygao, Apr 8, 2006, in forum: Python
    Replies:
    6
    Views:
    783
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Apr 8, 2006
  4. Gabriele *darkbard* Farina

    Unicode digit to unicode string

    Gabriele *darkbard* Farina, May 16, 2006, in forum: Python
    Replies:
    2
    Views:
    712
    Gabriele *darkbard* Farina
    May 16, 2006
  5. gabor
    Replies:
    13
    Views:
    829
    Leo Kislov
    Nov 18, 2006
  6. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    1,087
    Malcolm
    Jun 24, 2006
  7. Asterix
    Replies:
    5
    Views:
    964
    Matt Nordhoff
    Aug 31, 2008
  8. fhscobey
    Replies:
    0
    Views:
    346
    fhscobey
    Nov 3, 2005
Loading...