v1.52 problem in text and xml

Daniel Dai

Chieftain
Joined
Dec 23, 2005
Messages
8
after download the v1.52 patch, i found that it's better in memory crash. I can play for 1-2hours before shut down. anyway, there is something that don't happen in v1.09 but now occurs.
one is in text in game and after game won, the other is in the beginning of loading game in xml. the screenshots are shown as attached files.
Please be noticed and fix them in later patch.
Thanks!!!
 

Attachments

  • xml problem.JPG
    xml problem.JPG
    48.7 KB · Views: 141
  • xml2.JPG
    xml2.JPG
    38.8 KB · Views: 126
  • finish.JPG
    finish.JPG
    120.7 KB · Views: 112
  • finish2.JPG
    finish2.JPG
    118.6 KB · Views: 122
I think something's just screwed up in your XML files.

Installed any mods?

In any case, try reinstalling the patch. And if that doesn't work, reinstall the game, and then reinstall the patch.
 
This problem has been there since vanilla civ4, and exists because the xmls get parsed for validity with the local codepage, but there are some latin1-characters which aren't correctly escaped.
This problem only sources on with a MBCS-codepage (i.e. japanese, chinese, korean etc.).
The problem is, that some italian strings (and only the italian translations) end with an non-ascii-character, and this character gets parsed with the following < to one multibyte-character, which destroys the tag, so the xml appears to be malformed.
This only affects the italian strings (at least in vanilla civ4), and can be solved by either correctly escaping these characters (by &#<unicode-value> ;, the correct variant) or just adding a space at the end of the problematic strings (the lazy variant ;).
In 1.52, these lines need correct escapes:
9358, 9364:
ù -> &#38;#249;
9430, 9452, 9606:
à -> &#38;#224;

The easiest way is just making a search & replace for these two characters. too much escaping won't hurt, just makes it perhaps a bit harder to read (in the xml, the final output is not affected from this).

<rant>
The best solution would be to encode these xmls in UTF-8, as there wouldn't be any escapes needed any more, and as the new languages which seemingly added with a future patch include japanese and chinese, these language will need every single character to be escaped in the current way, which would make it impossible to change or correct these translations.
</rant>

Have much fun,
Inu-Yasha

Edit: Stupid forum parsed my to use as replace escapes ;)
Edit2: okay, but it won't parse &amp;, changed to unicode value
Edit3: okay, there seems to be a bug in the forum which changes any &#38;#38;s to & in edit/preview, screwing any escaped escapes when opening preview or edit.
 
Display problem after 1.52 on the screen F9 (french version).
 

Attachments

  • F9.jpg
    F9.jpg
    138.2 KB · Views: 192
This is corrected XML file.
I replaced all the non-ascii ISO-8859-1 characters to HTML numeric entity.
(with simple python script, not by manual edit)
Here it is... It will stop all XML error in Asian windows OS..
Unzip the attached file and put CIV4GameText_Misc1.xml to
"~My Documents/My Games/Sid Meier's Civilization 4/CustomAssets/xml/text

.
 

Attachments

Thanks, but it's not correcting anything, the display problem is still here.
 
SimCutie!

Thank You very much!
Your solution fix my problem completely prior to 'fixed XML' my ingame TEXT was replaced by weird "TEXT_KEY_blah_blah..." entry!
Now everything just fine!:)))

You have save my day!

Thanks again!

Chinese Windows XP Sp1 + Civ 4 English version
 
Back
Top Bottom