j_mie6
Deity
Hello,
I have been doing some work on my mod (naming city sites, a system simmilar to ryhes) and I found myself using a few accents. After the first couple of hitches in the file itself (and resorting to XML to define the accented city names) it works fine.
However when ever the sys.stdout.write() method is called from PyPrint (ie on any event in the EventManager) refering to those cities the same exceptions appear about it than happened when I tried using raw unicode in the python files:
does anybody know how I can change PyPrint to work correctly work with the accents?
in the XML I am using for example:
(where the é is actually the html Code &\#233; without the \ of course)
which works fine with in game messages and stuff just not the debug logs
Thanks,
Jamie
I have been doing some work on my mod (naming city sites, a system simmilar to ryhes) and I found myself using a few accents. After the first couple of hitches in the file itself (and resorting to XML to define the accented city names) it works fine.
However when ever the sys.stdout.write() method is called from PyPrint (ie on any event in the EventManager) refering to those cities the same exceptions appear about it than happened when I tried using raw unicode in the python files:
Code:
Traceback (most recent call last):
File "CvEventInterface", line 23, in onEvent
File "CvEventManager", line 188, in handleEvent
File "CvEventManager", line 918, in onCultureExpansion
File "CvUtil", line 122, in pyPrint
File "<string>", line 13, in write
UnicodeEncodeError
:
'ascii' codec can't encode character u'\xf6' in position 9: ordinal not in range(128)
ERR: Python function onEvent failed, module CvEventInterface
does anybody know how I can change PyPrint to work correctly work with the accents?
in the XML I am using for example:
Code:
<TEXT>
<Tag>CITY_MEXICO_CITY</Tag>
<English>Ciudad de México</English>
<French>Ciudad de México</French>
<German>Ciudad de México</German>
<Italian>Ciudad de México</Italian>
<Spanish>Ciudad de México</Spanish>
</TEXT>
which works fine with in game messages and stuff just not the debug logs
Thanks,
Jamie