Unicode in C

Unicode in C

Nadav Har'El nyh at math.technion.ac.il
Mon Mar 12 19:37:14 IST 2012


On Mon, Mar 12, 2012, Elazar Leibovich wrote about "Re: Unicode in C":
> The simplest option is, to accept StringPiece-like structure (pointer to
> buffer + size), and encoding, then to convert the data internally to your
> encoding (say, ISO-8859-8, replacing illegal characters with whitespace),
> and convert the other output back.

This is an option, but certainly not the simplest :-)
I thought a simpler option is to support only one encoding...

But you're right that with an existing library to do the conversions, it
might not be a big problem.

> Do you mind using iconv-like library?

What "iconv-like library"?

I'm not ruling this idea out. But what worries me is that at the end,
my users only use 1% of this library's features - e.g., I'll never need
this library's support from converting one encoding of Chinese to
another. So people who want to use the 50 KB libhspell will suddenly need
the 15 MB libicu.

-- 
Nadav Har'El                        |                    Monday, Mar 12 2012, 
nyh at math.technion.ac.il             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |War doesn't determine who's right but
http://nadav.harel.org.il           |who's left.



More information about the Linux-il mailing list