Re: Truncating UTF-8 Strings
Re: Truncating UTF-8 Strings
- Subject: Re: Truncating UTF-8 Strings
- From: Andrew Lindesay <email@hidden>
- Date: Tue, 9 Jun 2009 09:40:37 +1200
Hello Klaus;
If you render the original string, I presume that it does not contain
the corrupted UTF-8 sequence and renders the glyphs correctly?
returnValue = new String(textBlock.toString().getBytes("UTF-8"), 0,
lengthTruncated, "UTF-8");
^^^ I know you tried it using sub-strings, but this above would
definitely cause trouble as it could break inside multi-byte sequences.
cheers.
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden