Printing UTF-8 in C
Omer Zak
w1 at zak.co.il
Sun Jan 12 21:39:19 IST 2014
You may want to review the following StackOverflow item:
http://stackoverflow.com/questions/4607413/c-library-to-convert-unicode-code-points-to-utf8
One answer describes how to do it yourself.
Another answer uses the iconv library.
On Sun, 2014-01-12 at 21:29 +0200, Ori Idan wrote:
>
>
>
> On Sun, Jan 12, 2014 at 9:26 PM, Dov Grobgeld <dov.grobgeld at gmail.com>
> wrote:
> The most unixy way is to treat everything as binary UTF-8 and
> then forget about encodings. The following program works just
> fine:
>
> #include <stdio.h>
>
> int main()
> {
> printf("Hello שלום!\n");
> }
>
> Compile with:
>
> cc -o hello hello.c
> ./hello
> Hello שלום!
>
> (Though שלום is inversed in the terminal).
>
>
>
> That works, but I need one character such as 'א' to be printed and to
> be able to print 'ב' as 'א' + 1
> Does someone have any idea how to do it?
--
cal 09 1752
My own blog is at http://www.zak.co.il/tddpirate/
My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
More information about the Linux-il
mailing list