#886 Unicode code points

janbecvar Sat 26 Dec 2009

Documentation for method sys::Str.get says that Unicode code point is returned, but I think that Unicode code unit is really returned - there is used Java method String#charAt on line 130 in FanStr.java (not method String#codePointAt).

Do you plan to add consistent support also for code points in the future? For example see Ruby 1.9 documentation for String (str[index] returns code point at the given position, str.chars returns enumerator of code points and so on).

Is there equivalent for Java method Character#isLetter today? I can not find it.

brian Sun 27 Dec 2009

The Fantom APIs all use Int for chars, so we won't run into future problems. Under the covers I am using char for most all the JVM implementation, but just because I was seeing some performance issues originally and b/c JVM 16-bit chars handle plane 0 fine for now. So just to be clear the Fantom APIs are designed to work only with Unicode code points via an Int.

I don't have anything like isLetter, but I'll take a look at adding it.

Login or Signup to reply.