Re: Unicode strings?
Am 12.03.2014 11:16, schrieb Lester Caine:
Crypto Compress wrote:
The very first problem I hit is ICU's limitation to 32bit string lengths. How
does the switch to 64bit string length on 64 bit platforms impinge on this.
While I can see the advantage of this particular change, would that also now
require our own version of ICU capable of also handling longer strings? This
probably falls out in the wash of my next point ...
Where have you found this information? Can you please provide source for this?
This information has been published in several places on the list and in the
wiki already ...
http://userguide.icu-project.org/strings/utf-8 for the ICU, and the RFC's here
for 64 bit improvements to PHP ...
Quote #1: "You can request 64 or 32 bits with the --with-library-bits= option, ..."
Quote #2: "Strings are represented as UChar * as the base string type."
http://userguide.icu-project.org/icufaq#TOC-How-do-I-get-32--or-64-bit-versions-of-the-ICU-libraries-
String length is platform dependent.
It is not only PHP that has hidden gems of information buried in the documentation, but ...
"For UTF-8 strings, ICU normally uses (const) char * pointers and int32_t lengths"
The question here is how UTF-8 default works in ICU as we want to actually avoid using UChar altogether using UText instead - I think?
http://www.icu-project.org/apiref/icu4c/utext_8h.html
int64_t utext_nativeLength (UText *ut) Get the length of the text.
Looks like UText is utf-16.
Thread (28 messages)