Re: [R] How to get the length of an UTF-8 string

2008-11-06 Thread Prof Brian Ripley
On Thu, 6 Nov 2008, Fán Lóng wrote: Hi there, I am intending to get the length of an UTF-8 string which contains some Japanese characters (let's say, rstr) in R language. I try to use the nchar(rstr) to get its length, however, it returns the "NA" for it contains some multi-byte characters. Is

[R] How to get the length of an UTF-8 string

2008-11-06 Thread Fán Lóng
Hi there, I am intending to get the length of an UTF-8 string which contains some Japanese characters (let's say, rstr) in R language. I try to use the nchar(rstr) to get its length, however, it returns the "NA" for it contains some multi-byte characters. Is there any alternatives to return the l