On Sep 30, 2010, at 6:18 PM, Paul McNett wrote:

> If I understand correctly, xmltodict() should decode using whatever encoding 
> is 
> specified in the XML header, instead of using dabo's defaultEncoding. And 
> dicttoxml() 
> should encode using either an explicitly-passed encoding, or dabo's 
> defaultEncoding.


        That's correct.

        I've just posted an update that adds 'dabo.getEncoding()' as the single 
source of truth regarding encoding settings, and updates to all the files that 
reference the encoding settings to use it.

        One thing I didn't touch, though, is some places where you have 
hard-coded utf8 encoding in xml headers. Here's the grep output:

lib/datanav/Form.py:852:                rfxml = """<?xml version="1.0" 
encoding="utf-8" standalone="yes"?>
lib/reporting_tests/invoice_demo/invoice.rfxml:1:<?xml version="1.0" 
encoding="utf-8" standalone="yes"?>
lib/reportWriter.py:2375:               header = """<?xml version="1.0" 
encoding="utf-8" standalone="yes"?>

        You might want to update those to use dabo.getEncoding() instead.



-- Ed Leafe




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to