It's solved, it was a locale problem: I put
import locale
locale.setlocale(locale.LC_ALL,"fr_FR.iso8859-1")
at the beginning of the script, and now the 8-bit-chars show up correctly.
Thanks all for your help.
--
Fabrice DELENTE
--
http://mail.python.org/mailman/listinfo/python-list
> Try "export LINES COLUMNS" to set them as environment variables.
Thanks, it works. Didn't know that.
--
Fabrice DELENTE
--
http://mail.python.org/mailman/listinfo/python-list
on doesn't get these values. I have to start the script with
$ LINES=$LINES COLUMNS=$COLUMNS ./sort_entries.py
How come?
--
Fabrice DELENTE
--
http://mail.python.org/mailman/listinfo/python-list
/* Print it on to the real screen */
getch();/* Wait for user input */
endwin(); /* End curses mode */
return(0);
}
and both my tries (with printw, or with addstr) showed the 8-bot chars
correctly.
--
Fabrice DELENTE
--
http://mail.python.org/mai
chars.
--
Fabrice DELENTE
--
http://mail.python.org/mailman/listinfo/python-list
> What happens when you try this?
> stdscr.addstr(0,0, u"leçon".encode('iso8859-15'))
> I don't really expect it to work
And it doesn't...
As support for 8-bit (and even unicode) is important for my script, is there
any hope? Should I switch to slang
able, so the problem is either on
ncurses side, or on python side.
I have
#!/usr/local/bin/python
#coding: iso8859-15
at the top of my python file.
--
Fabrice DELENTE
--
http://mail.python.org/mailman/listinfo/python-list
issing?
Thanks.
--
Fabrice DELENTE
--
http://mail.python.org/mailman/listinfo/python-list