On 07/02/2014 12:51 AM, Sascha Ziemann wrote:
> 2014-07-02 5:29 GMT+02:00 Jim Rees <[email protected]
> <mailto:[email protected]>>:

> Java is broken. From the Java 7 documentation:
>
> "A |String| represents a string in the UTF-16 format in which
> /supplementary characters/ are represented by /surrogate pairs/.
> Index values refer to |char| code units, so a supplementary character
> uses two positions in a |String|."
>
> If you call Java to return you the third character, you will either
> get the half of a surrogate pair or a completely different character
> or the operation is is not O(1).

It's broken, if you see "get the third character" as an important
and useful operation.  It isn't, in itself.
-- 
        --Per Bothner
[email protected]   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
[email protected]
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

Reply via email to