For Programmers: Free Programming Magazines  


Home > Archive > Scheme > December 2006 > Need help with UTF-8









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Need help with UTF-8
SirOwl

2006-12-21, 7:08 pm

I need to create a text file encoded with UTF-8 charset. Anyone knows
how?

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/
SirOwl

2006-12-22, 4:12 am

Thanks muchly.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com