2 pages tagged with "utf-8"
More about UTF-8
August 02, 2008
Now suppose you want to rid string of malformed utf-8 characters.
Here is an example that checks an utf-8 string and replaces all malformed characters with '?'. The same idea as in the previous post. Note, that it checks only encoding, it is possible that encoding is correct, but the symbol doesn't …
read more
How to truncate UTF-8 string
July 16, 2008
<p>Suppose you need to put UTF-8 string into a fixed length buffer. Actually I was in need to do this. Problem is that the last symbol may be incomplete, so here is the example how to do this
read more