[webkit-help] How can I write content of a TextRun to a file

Julien Chaffraix julien.chaffraix at gmail.com
Sun Jan 17 15:30:55 PST 2010

> I have looked at your ICU example.  But i dont' quit understand what to do.
> Should i call the function u_UCharsToChars() to convert TextRun int char*?

No, it is not need. You just have to iterate over the UChar using the
following (taken from the example but not tested):

UChar c;
UChar* s = run.characters() + from;
int length = to - from;
for(int i=0; i<length; /* U16_NEXT post-increments */) {
   U16_NEXT(s, i, length, c);
   printf(" %04x", c);

If you decide to continue this way, you are better asking questions on
an ICU mailing list.


More information about the webkit-help mailing list