Użytkownik Paul McNett napisał: >> As I told to Ed in previous post, Python encoding names >> doesn't conform IANA encoding names. >> Thus, I also suggest to use hard coded "utf-8" encoding. >> > Do you mean to say that every time we write out an xml, to use "utf-8"? >
For Dabo structures, yes. Why not, since 'utf-8' is preferred encoding for xml. In fact, you can't chose free encoding, because xmltodict always uses system encoding, not xml header declared one, and this is wrong. > >> In my "settings_override.py" I have entry: >> >> if defaultEncoding.lower() == "utf8": >> defaultEncoding = "utf-8" >> elif defaultEncoding.lower() == "1252": >> defaultEncoding = "windows-1252" >> > There has to be a python library for these mappings already. I'd hate to > maintain > every single one we come across... > Yes, but Ptyhon encodings.aliases translates names from 'windows-1252' to '1252' but not in reverse order. And encoding attribute in xml header must meet IANA requirements. -- Regards Jacek Kałucki _______________________________________________ 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]
