Log in

View Full Version : ISO-8859-1 problem with filename in module



dbachen
May 9th, 2021, 15:18
I have a filename for an image which has an extended character in it - æ, specifically Ræsvælg.

Within FGC, there are no errors which opening or working with this image within the campaign, and the exported module also works in FGC (both the reference manual and the NPC's link to the image).

Within FGU, there are no errors which opening or working with this image within the campaign. However, when using the module it cannot load the image, so it breaks the reference manual as well as opening the NPC.

The campaign I am working on has dozens of the extended characters and they all seem to work in other locations. This was the only image with the extended character in the filename though, so I think it's specific to that.

In the db.xml, you sometimes see the actual character, and sometimes the encoded version, depending if the node type is a string:

e.g <name type="string">Ræsvælg</name>

It's not consistent though.. on some string values it encodes - here's one example for a caption
e.g. <caption type="string">Image: R&amp;#230;sv&amp;#230;lg</caption>

When looking at db.xml from the campaign, the link to the image looks like this:
<bitmap>campaign/images/Ræsvælg.jpg</bitmap>

Bottom line, I believe the issue is with the export function not recognizing the extended character from the OS.
If you open the module archive and look at it, the filename within the module is recorded as Rµsvµlg.jpg instead if Ræsvælg.jpg

LordEntrails
May 9th, 2021, 19:55
Not sure if this matters, but might; what o/s are you running and what language settings is it using?

That info might be needed to reproduce this.

dbachen
May 9th, 2021, 21:49
Windows 10 - English (US)
I am also doing this from FGC for compatibility. I did not try to export it from FGU to see if that handled it any differently.

So just to clarify
- If the filename has an extended character in it (e.g. Ræsvælg.jpg) , it gets encoded correctly in the db.xml which is outputted
- When the images themselves are compiled into the .mod file, the filename isn't written the same (e.g. Rµsvµlg.jpg)

Here's a screenshot showing the image name within the .mod
46490

Moon Wizard
May 10th, 2021, 06:21
For now, I suggest you just change the file name to get it working. (Rasesvaelg.jpg)

Regards,
JPG