Ken
5/27/2009 12:00:00 PM
On May 2, 8:25 am, Yukihiro Matsumoto <m...@ruby-lang.org> wrote:
> Hi,
>
> In message "Re: String from code points?"
> on Sat, 2 May 2009 05:45:04 +0900, Marcos <markjr...@gmail.com> writes:
>
> |Given a(n array of) numeric value(s) representing (a)Unicodecode
> |point(s), how do I get a string of the indicated character(s)?
> |
> |Integer#chr doesn't seem to know about encodings; it just outputs the
> |byte value (and fails for values that don't fit in a byte).
>
> p 12354.chr
> => 12354 out of char range (RangeError)
>
> p 12354.chr("utf-8")
> => ?
If the error happens then does it mean the ruby(http://
tryruby.hobix.com/) is using a old version? what version I should use
instead?
p 12354.chr("utf-8")
ArgumentError: wrong number of arguments (1 for
0)
from (irb):3:in
`chr'
from (irb):
3
from :0