| Steve Schafer 2006-12-21, 7:08 pm |
| On 21 Dec 2006 10:49:48 -0800, "SirOwl" <skosunda@gmail.com> wrote:
>I need to create a text file encoded with UTF-8 charset. Anyone knows
>how?
Yes, lots of people know how. What character encoding are you starting
with?
If you're starting with true ASCII (7-bit) text, then the conversion is
trivial; 7-bit ASCII is a subset of UTF-8.
If you're starting with UTF-16 (two-byte "wide" characters), then the
conversion algorithm is simple and mechanical. You can find the
algorithm in a number of places, such as in the Unicode specification
(http://www.unicode.org/).
If you're starting with any other encoding, then the usual practice is
to first convert to UTF-16, and then do a UTF-16 -> UTF-8 conversion.
Steve Schafer
Fenestra Technologies Corp.
http://www.fenestra.com/
|