bug-ncurses
[Top][All Lists]
Advanced

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

japanese print


From: 이학성
Subject: japanese print
Date: Mon, 13 Sep 2010 14:42:56 +0900

 I compiled following source printing japanese and linked with libcursesw 5.7 library.
The First and second print was displayed well.
But the third print was broken.
What should I do to print the third well?

 

On linking with libcurses 5.3 library, all are displayed well.


#include <ncurses.h>
#include <locale.h>

 

int main()
{
    int i;
    char japanese[]="ほげほげ";

    setlocale(LC_ALL,"");
    initscr();

 

    /* first print */
    mvprintw(1,0,"%s\n",japanese);

 

    /* second print */
    for(i=0;i<8;i++)
        printw("%c",japanese[i]);

 

    /* third print */
    for(i=0;i<9;i++)
        mvprintw(3,i,"%c",japanese[i]);

 

    refresh();
    sleep(10);
    endwin();

    return 0;
}


Following is my current environment.

- emulator : putty ( Character set translation: Use font encoding, Font: MS Gothic, Script: Japanese)
- termianl : xterm
- locale
LANG=ja_JP.shiftjis
LC_CTYPE="ja_JP.shiftjis"
LC_NUMERIC="ja_JP.shiftjis"
LC_TIME="ja_JP.shiftjis"
LC_COLLATE="ja_JP.shiftjis"
LC_MONETARY="ja_JP.shiftjis"
LC_MESSAGES="ja_JP.shiftjis"
LC_PAPER="ja_JP.shiftjis"
LC_NAME="ja_JP.shiftjis"
LC_ADDRESS="ja_JP.shiftjis"
LC_TELEPHONE="ja_JP.shiftjis"
LC_MEASUREMENT="ja_JP.shiftjis"
LC_IDENTIFICATION="ja_JP.shiftjis"
LC_ALL=

 

I attached original source file.

Thank you.

Attachment: japan.c
Description: Text Data


reply via email to

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