Mageia Bugzilla – Attachment 2916 Details for
Bug 7707
UTF-8 is not working in Python's curses
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Example of UTF-8 curses program made in Python that prints junk instead than the correct UTF-8 char
utf8cursestest.py (text/x-python), 342 bytes, created by
Luca T
on 2012-10-04 15:54:20 CEST
(
hide
)
Description:
Example of UTF-8 curses program made in Python that prints junk instead than the correct UTF-8 char
Filename:
MIME Type:
Creator:
Luca T
Created:
2012-10-04 15:54:20 CEST
Size:
342 bytes
patch
obsolete
>#!/usr/bin/python ># -*- coding: utf-8 -*- >import curses >import locale > >locale.setlocale(locale.LC_ALL,"") >stdscr = curses.initscr() >curses.noecho() >curses.cbreak() >stdscr.keypad(1) >stdscr.addstr(0, 0, "UTF-8 Test: â", curses.A_REVERSE) >stdscr.refresh() >c = stdscr.getch() >curses.nocbreak() >stdscr.keypad(0) >curses.echo() >curses.endwin() >
#!/usr/bin/python # -*- coding: utf-8 -*- import curses import locale locale.setlocale(locale.LC_ALL,"") stdscr = curses.initscr() curses.noecho() curses.cbreak() stdscr.keypad(1) stdscr.addstr(0, 0, "UTF-8 Test: â", curses.A_REVERSE) stdscr.refresh() c = stdscr.getch() curses.nocbreak() stdscr.keypad(0) curses.echo() curses.endwin()
View Attachment As Raw
Actions:
View
Attachments on
bug 7707
: 2916