Użytkownik Ed Leafe napisał:
> On Oct 3, 2010, at 5:20 PM, Jacek Kałucki wrote:
>
>
>> Something wrong happens after last changes with IDE:
>> http://dabo.codepad.org/bKBRe4Ok
>>
> Another typo. It should work now.
>
>
>> I think, that your change should work.
>> But I still think, that 'utf-8' is better encoding for Dabo data.
>> And current setting breaks IANA requirements from encoding naming,
>> because e.g. Python 'cp1252' should be 'windows-1252' instead.
>>
> I'm not sure what should be done about that. Are you saying that the
> Python locale module returns incorrect values?
>
Python 'locale.getlocale()[1]' call, used by Dabo returns '1252' value,
while proper IANA standard encoding name is 'windows-1252'.
Third party applications may not be able to handle such xml,
and even Dabo raises exceptions:
Traceback (most recent call last):
File "c:\Python25\lib\site-packages\dabo\ui\uiwx\dMenuItem.py", line
58, in __onWxHit
self.raiseEvent(dEvents.Hit, evt)
File "C:\Python25\lib\site-packages\dabo\ui\uiwx\dPemMixin.py", line
1002, in raiseEvent
super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,
**kwargs)
File "C:\Python25\lib\site-packages\dabo\lib\eventMixin.py", line 92,
in raiseEvent
bindingFunction(event)
File "c:\SVN\dabodev\ide\ReportDesigner.py", line 2564, in onFileOpen
o.editor.openFile(fileName)
File "c:\SVN\dabodev\ide\ReportDesigner.py", line 2077, in openFile
self._rw.ReportFormFile = fileSpec
File "c:\Python25\lib\site-packages\dabo\lib\reportWriter.py", line
2657, in _setReportFormFile
self._reportForm = self._getFormFromXML(self._reportFormXML)
File "c:\Python25\lib\site-packages\dabo\lib\reportWriter.py", line
2479, in _getFormFromXML
xmldict = xmltodict(xml)
File "C:\Python25\lib\site-packages\dabo\lib\xmltodict.py", line 202,
in xmltodict
raise dabo.dException.XmlException(errmsg)
dabo.dException.XmlException: An invalid XML string was encountered: XML
declaration not well-formed: line 1, column 30
Currently I change all '1250' to 'windows-1252' string manually.
But unicode encoding name 'utf-8' is the same in both, Pyhon and IANA.
Why you defend against moving encoding into dictto.xml.todict functions
and using 'utf-8' by default for Dabo structures?
You still uses hardcoded 'utf-8' encoding in ClassDesigner.
--
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]