On 9/30/10 6:02 PM, Ed Leafe wrote:
> 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.

Cool.

>       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.

Hmm, maybe. What would happen if a report was created on Windows, and the xml 
got 
saved with encoding="cp-1252" and the person tried to run the report on Linux?

I guess I need advice from people that deal with these issues more than I do.

Paul

_______________________________________________
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