Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] perl/curses/utf8
- Date: Sat, 06 Aug 2011 09:06:31 -0700
- From: s smith <sjs@example.com>
- Subject: Re: [tlug] perl/curses/utf8
- References: <4E3B4C93.1040907@example.com> <8762mcgwh7.fsf@example.com> <4E3D2E41.5030304@example.com>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11
On 08/06/2011 05:06 AM, Shmuel Fomberg wrote:I took a passing look at the Curses module, and it is seen to be not unicode aware. So maybe you should try to encode the string to UTF-16/32 before passing it to printw? (using the Encode module) Shmuel.Hi Shmuel.I tried both the 'use utf8' and Encode. The code below is what I'm trying to execute. The first print/sleep is just so I can see that the string looks right.I was hoping someone over there still used the Curses over there and had already been through this.I just found a link indicating that by default the code is linked with a library that doesn't support wide characters and gives instructions on how to fix this. Let me see what happens with this.Thanks very much for your reply. On 08/05/2011 12:15 AM, Stephen J. Turnbull wrote:Stephen -- for what it's worth, much of emacs doesn't make much sense to me. :) I think with curses, printw is print to window not print wide, but I don't have that much experience with Curses package -- perl or C.,,, But Perl's Unicode support is internally an extension of UTF-8 AFAIK, so `printw' in Perl doesn't make much sense to me. (But then, not much in Perl does make sense to me, I'd rather read raw modem traffic. :-)Thanks. Steve S. ========= use Curses; use Encode qw(encode decode); binmode(STDOUT, ':utf8'); my $str = decode 'utf8', 'よろしく、世界'; print $str, "\n"; sleep 5; initscr(); printw("Hello world!\n"); printw($str); refresh(); getch(); endwin();
- Follow-Ups:
- Re: [tlug] perl/curses/utf8
- From: Shmuel Fomberg
- Re: [tlug] perl/curses/utf8
- From: Stephen J. Turnbull
- References:
- [tlug] perl/curses/utf8
- From: s smith
- [tlug] perl/curses/utf8
- From: Stephen J. Turnbull
- Re: [tlug] perl/curses/utf8
- From: Shmuel Fomberg
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] perl/curses/utf8
- Next by Date: Re: [tlug] perl/curses/utf8
- Previous by thread: Re: [tlug] perl/curses/utf8
- Next by thread: Re: [tlug] perl/curses/utf8
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links