В сообщении от 5 января 2007 05:33 Dmitry Timoshkov написал(a):
"Anatoly Lyutin" <vostok(a)etersoft.ru>
wrote:
This patch fixs wineconsole for non latin
symbols. If we have ncursesw
we use unicode functions to console output.
Most likely the real fixes in your patch are changing CP_ACP to CP_UNIXCP
and getting rid of hardcoded vkkeyscan_table. Do you have an evidence that
ncurses is so much broken that it really can't handle UTF-8? Does it work
if you change the locale to a not UTF-8 one?
Dmitry, as I already post in this thread, we have test program which does not
print correctly ever in UTF-8 locale.
Usual ncurses works in 8-bit locales like koi8-r correctly, but we can't
output in utf8 locale.
Test program for output utf8 string in utf-8 console:
#include <ncurses.h>
#include <stdio.h>
#include <string.h>
#include <locale.h>
int main()
{
setlocale(LC_ALL,"");
int i=0;
unsigned char cOut[] = {0xd0, 0x9f, 0xd1, 0x80, 0xd0, 0xb8, 0xd0, 0xb2,
0xd0,0xb5,0xd1, 0x82,0x00 };
printf("String with cyrillic symbols (out with printf):\n");
printf("%s\n",cOut);
initscr();
mvaddstr(2,0,"String with cyrillic symbols:");
mvaddstr(4,0,cOut);
refresh();
getch();
endwin();
return 0;
}
--
Vitaly Lipatov, ALT Linux Team
Russia, Saint-Petersburg,
www.etersoft.ru