#744: admi18n wrong dealing with non-english utf-8 characters
---------------------+------------------------------------------------------
 Reporter:  matej    |        Owner:  anonymous
     Type:  defect   |       Status:  new      
 Priority:  normal   |    Milestone:  0.9a5    
Component:  Toolbox  |      Version:           
 Severity:  normal   |   Resolution:           
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by matej):

 Yes, I am on Windows. I get the following as soon as I encode the file to
 utf-8. After reencoding to ansi, I don't get the error anymore:

 Page handler: <bound method Internationalization.po_view of
 <turbogears.toolbox.admi18n.Internationalization object at 0x0146E490>>
 Traceback (most recent call last):
   File "c:\python24\lib\site-
 packages\cherrypy-2.2.0-py2.4.egg\cherrypy\_cphttptools.py", line 106, in
 _run
     self.main()
   File "c:\python24\lib\site-
 packages\cherrypy-2.2.0-py2.4.egg\cherrypy\_cphttptools.py", line 255, in
 main
     body = page_handler(*virtual_path, **self.params)
   File "<string>", line 3, in po_view
   File "c:\turbogears\turbogears\controllers.py", line 200, in expose
     output = database.run_with_transaction(expose._expose,func, accept,
 allow_json, allow_json_from_config,*args, **kw)
   File "c:\turbogears\turbogears\database.py", line 216, in
 run_with_transaction
     retval = func(*args, **kw)
   File "<string>", line 5, in _expose
   File "c:\turbogears\turbogears\controllers.py", line 220, in <lambda>
     expose._expose.when(rule)(lambda _func, accept, allow_json,
 allow_json_from_config,*args,**kw: _execute_func(
   File "c:\turbogears\turbogears\controllers.py", line 241, in
 _execute_func
     output = errorhandling.try_call(func, *args, **kw)
   File "c:\turbogears\turbogears\errorhandling.py", line 68, in try_call
     return func(self, *args, **kw)
   File "c:\turbogears\turbogears\toolbox\admi18n\__init__.py", line 125,
 in po_view
     return dict(code=code,
 catalog=catalog.items(path,sort_by,dir),visible_checkbox=visible_checkbox
 )
   File "c:\turbogears\turbogears\toolbox\admi18n\catalog.py", line 24, in
 items
     po = parse(path)
   File "c:\turbogears\turbogears\toolbox\admi18n\catalog.py", line 172, in
 parse
     l = eval(l)
   File "<string>", line 1
     # SOME DESCRIPTIVE TITLE.
                             ^
 SyntaxError: unexpected EOF while parsing

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/744>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to