Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #90 (closed defect: worksforme)

Opened 9 years ago

Last modified 7 years ago

tg-admin shell does not handle unicode/international input well

Reported by: Petr Mifek Owned by: anonymous
Priority: low Milestone: 0.9
Component: TurboGears Version:
Severity: minor Keywords:
Cc:

Description

It currently may be a bug in python library's code.interact, but if it is that, we should at least warn the user to save him from some nightmares when debbuging the character sets browser-turbogeard-database chain...

Example:

C:\pythondev\gs>tg-admin shell
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> print u'é'.encode('utf8').decode('utf8')
Traceback (most recent call last):
  File "<console>", line 1, in ?
  File "C:\Python24\lib\encodings\cp852.py", line 18, in encode
    return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\x82' in position 0: character maps to <undefined>
>>>

But on the same machine in the same shell:

C:\pythondev\gs>\python24\python.exe
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print u'é'.encode('utf8').decode('utf8')
é
>>>

... which is the right thing it should do.

Change History

comment:1 Changed 8 years ago by godoy

  • Status changed from new to closed
  • Resolution set to worksforme

It works for me on Linux... I'm closing this as "worksforme" due to the lack of anything related to it in the last 5 months. If the reporter of this bug still has this problem, please, reopen it.

comment:2 Changed 8 years ago by kevin

  • Milestone changed from 1.0 to 0.9
Note: See TracTickets for help on using tickets.