#3425: WebAdmin should be more conservative with trac.ini
-------------------------+--------------------------------------------------
 Reporter:  eblot        |        Owner:  anonymous
     Type:  enhancement  |       Status:  assigned 
 Priority:  normal       |    Milestone:  0.10     
Component:  webadmin     |      Version:  devel    
 Severity:  minor        |   Resolution:           
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by anonymous):

  * keywords:  review =>
  * owner:  cboos => anonymous
  * priority:  lowest => normal
  * status:  new => assigned

Comment:

 Replying to [comment:9 eblot]:
 > It seems the !ConfigParser does not make any character set translation
 at all. So when we read UTF-8 from the ini file, the configuration parser
 uses utf-8 values. What about if we place unicode characters in the
 configuration parser and call the `save()` method? It seems that neither
 the original parser method or the patch method can cope with Unicode. Am I
 wrong?

 Partly: it works fine with Unicode values, but the current way to do the
 `save()`
 is not optimal: I first did the correct thing to do, i.e.
 `to_unicode(value).encode('utf-8')`, but then overwrote the patch with a
 simpler one, which just used `value`. That second solution ensured that
 the original charset used for the `trac.ini` file would be preserved. But
 OTOH, when a config value is programmatically changed (as with WebAdmin),
 the encoding used will be "utf-8"
 (see `Section.set()`) and therefore we would eventually end with a mix of
 charsets, which is not good ;)

 So I think it's not that important if the original charset is lost, and
 "utf-8" is used instead. I'll add a `# -*- coding: utf-8 -*-` first line
 to the file, to make that clear.

 Also, there's no support yet for Unicode keys and section names,
 as I think this would have been overkill.

 > BTW: it there any reason why the 'top level' scripts in `/scripts`
 directory are kept encoded using `iso-8859-1` rather than `utf-8` as the
 rest of the code? ex:

 Oversight, probably...

-- 
Ticket URL: <http://trac.edgewall.org/ticket/3425>
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