Printing UTF-8 in C
Ori Idan
ori at helicontech.co.il
Sun Jan 12 21:24:34 IST 2014
On Sun, Jan 12, 2014 at 9:02 PM, Baruch Siach <baruch at tkos.co.il> wrote:
> Hi Dov,
>
> On Sun, Jan 12, 2014 at 08:53:38PM +0200, Dov Grobgeld wrote:
> > Writing hebrew to the terminal is a bad idea because terminals do not
> > support BiDi reordering.
> >
> > That said, doing "cat small-hello.utf8"[1] works for me in gnome-term
> > (though it is reversed). No special environment variables were defined.
>
> But Ori has specifically asked about sending just one character to
> terminal.
> cat treats everything like binary data.
>
> baruch
>
I don't care at this stage about bidi.
I still could not find out how to print even once character, I tried printf
and putwchar.
--
Ori Idan
>
> > On Sun, Jan 12, 2014 at 8:34 PM, Ori Idan <ori at helicontech.co.il> wrote:
> > > I need to print several Hebrew characters (UTF-8) to the terminal.
> > > My locale is set to he_IL.UTF-8 so it shows Hebrew on the terminal,
> > > however printing from C gives me Chinese characters.
> > > My question is how to print one character such as 'א' to the terminal.
> > >
> > > --
> > > Ori Idan
>
> --
> http://baruch.siach.name/blog/ ~. .~ Tk Open
> Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
> - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20140112/0b721243/attachment.html>
More information about the Linux-il
mailing list