hi all

keldath

LivE LonG AnD PrOsPeR
Joined
Dec 20, 2005
Messages
7,578
Location
israel
can someone help me with this error:


attachment.php


i dunno what it means -i tried to understand the reference, but failed.
 

Attachments

  • error.jpg
    error.jpg
    44.8 KB · Views: 172
What this means is that the Python code is trying to write a character using a character set that doesn't include it. In this specific case it is the world builder trying to write the hebrew character yod that is included in a leaders name.

If you look at the top of the CvWBDesc.py file at line 19 you will see the following line:

PHP:
fileencoding = "latin_1"	# aka "iso-8859-1"

This defines the character set used. This character set only contains 256 characters, hence the reference to 256 in the error message, but the number representing the yod character (hex 05d9) is > 256.

You can try googling for character sets, code pages and character encoding if you want, but the quick solution is to only use characters from the iso-8859-1 character set in objects displayed in the world builder, which includes pretty much everything.
 
You could probably switch the entire encoding from "latin_1" to "unicode_escape". Probably...

If it has any issues with this, you can do it on a case by case basis instead. In Final Frontier Plus adding BUG added the automatic unit naming option which puts the unit type into the name which for the upgraded unit types includes the delta and omega characters that are added to the game font in place of other characters (great people and electrical power, actually - not that it is relevant). These turn out to be way up in the unicode range at 4000-something, I think (maybe 8000-something). So when the worldbuilder saves were made it initially had this problem. In FFP just the relevant writes and reads for the unit names were switched over to "unicode_escape".
 
Back
Top Bottom