KpyM Telnet/SSH Server - Forum
|UTF8 mode and wide PDCurses Windows Console application
||UTF8 mode and wide PDCurses Windows Console application
||Oct 06 2015 16:02
I am trying to use UTF8 mode to display Japanese characters.
I am running a Windows Console application compiled using Visual Studio 2012 with Unicode. The characters that are written to the screen are all wchar_t (wide) characters. I must run the application after telnet into the server, via PUTTY client, using UTF8 remote character set. Also, (in PUTTY configuration) I am using MS Gothic font, with 'Japanese' font script.
There is an example menu screen that is supposed to appear like this:
WMS ﾒｲﾝﾒﾆｭｰ M2
1 入庫時 QC
終了 = ESC
(That is how it is supposed to look.)
However, after configuring UTF8 mode in telnet.ini and changing code page in allusers.bat, chcp 65001, I still only see ? characters for every Japanese character like so:
WMS ??????? M2
1 ??? QC
?? = ESC
Will KTS not be able to display Japanese characters when the Windows application locale has been changed to 65001 and the characters written by Curses are wide characters?
For example, in Ncurses and PDCurses, there are two APIs. One API is for single byte mode where every character is represented using a *char, and is a single byte. The other API uses *wchar_t to represent every character, which is represented by Unicode integers and is multibyte in UTF8 mode.
||Oct 06 2015 17:28
I partially fixed the problem, I had left this line commented out with a ; character:
;export_code_page = 65001
Just removed the ; character and it *almost* works:
export_code_page = 65001
What is happening now is, several characters are left displayed on the screen after the Curses API clears and refreshes the screen(s) to display new screens. Also for some reason, some of the Japanese characters are displayed okay the first or second time, then when the screen that displays the (problem) characters is showed again later, it becomes a corrupt (or missing entirely) character. :-(
||Oct 09 2015 07:52
You can try to disable the scrollback buffer (set buff_height=0), it might help
© 2007 - 2008 Kroum Grigorov