#2972: Error with non-ASCII project description
---------------------+------------------------------------------------------
 Reporter:  eblot    |       Owner:  jonas  
     Type:  defect   |      Status:  new    
 Priority:  normal   |   Milestone:         
Component:  general  |     Version:  devel  
 Severity:  major    |    Keywords:  unicode
---------------------+------------------------------------------------------
 If the project description in the configuration file (`conf\trac.ini`)
 contains non-ASCII characters, such as:
 {{{
 [project]
 ; ...
 descr = Tést
 }}}
 Trac [3094] fails with the following error:

 ==== Python traceback ====
 {{{
 Traceback (most recent call last):
   File "trac\web\main.py", line 299, in dispatch_request
     dispatcher.dispatch(req)
   File "trac\web\main.py", line 153, in dispatch
     populate_hdf(req.hdf, self.env, req)
   File "trac\web\main.py", line 92, in populate_hdf
     hdf['project'] = {
   File "trac\web\clearsilver.py", line 194, in __setitem__
     self.set_value(name, value, True)
   File "trac\web\clearsilver.py", line 236, in set_value
     add_value(name, value)
   File "trac\web\clearsilver.py", line 228, in add_value
     add_value('%s.%s' % (prefix, k), value[k])
   File "trac\web\clearsilver.py", line 218, in add_value
     self.hdf.setValue(prefix, markup.escape(value))
 UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
 position 1: ordinal not in range(128)
 }}}

 It seems the `trac.ini` file encoding is irrelevant. At least, the same
 trouble occurs with iso-8859-1 and utf-8 encodings.

 The trouble occurs with the project description, but it probably occurs
 with other fields as well.

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2972>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to