[tor-bugs] #6450 [Metrics Utilities]: Task #6329 Python script can't encode unicode characters

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Aug 4 17:25:00 UTC 2012


#6450: Task #6329 Python script can't encode unicode characters
-------------------------------+--------------------------------------------
 Reporter:  karsten            |          Owner:     
     Type:  defect             |         Status:  new
 Priority:  minor              |      Milestone:     
Component:  Metrics Utilities  |        Version:     
 Keywords:                     |         Parent:     
   Points:                     |   Actualpoints:     
-------------------------------+--------------------------------------------

Comment(by atagar):

 Hi Karsten. Unicode is a bit of a pita in python 2.x. Options are...

 - Make sure to use unicode strings rather than regular (ascii) strings.
 Unicode strings start with a 'u', for instance...

 {{{
 >>> u"こんにちは"
 u'\u3053\u3093\u306b\u3061\u306f'
 }}}

 - Switch to python 3.x. One of the big changes in the upgrade was that
 strings are now unicode (like java).

 Hope that helps. -Damian

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6450#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list