bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ncurses shift-jis


From: Thomas Dickey
Subject: Re: ncurses shift-jis
Date: Tue, 15 Jan 2008 08:18:52 -0500 (EST)

On Tue, 15 Jan 2008, technoxicated wrote:


I have a rhel4.4 system. the locale is set to Shift-JIS

I don't recall what version/patchlevel of ncurses would be there.

I am trying to read a file which has some japanese content and display it in
a ncurses window. I can view the file properly using vi and cat also
displays it fine. Foll are the steps that i follow:

1. setlocale () //set to shift-jis
2. initscr()
3. fopen() //open file
4. fgets() //read into buffer from file
5. printw() //display the contents of the buffer

This program is displaying garbage. Is this the correct way to go about this
or am I missing something?

It sounds right (what terminal type are you using, btw?)

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]