Modding, Mission Design, and Coding > Test Builds

Unicode text support

<< < (2/11) > >>

m!m:
That was very helpful, thank you. I found the cause of the error but I have to think about how to fix it properly.

The technical reason is that Axems message box script had an effect where the text is displayed character by character to simulate a scroll in effect. The problem with that is that sometimes it slices a mutli-byte UTF-8 sequence in half which results in an invalid UTF-8 encoding sequence. I think I will add some code to validate the strings passed to the Lua API to make the error message easier to understand. Since the Lua version we are using does not have support for handling UTF-8 encoded strings I will also add a library with functions for iterating over these UTF-8 codepoints.

m!m:
The issue you found in BtA should be fixed now. The builds in the first post have been updated.

Without any changes to the mod data the new builds will still show an error message but that should be a little more helpful for mod developers since it actually tells them what is wrong. I fixed Axems message box script by using some new functions that I added to the FSO scripting API. I attached the new file to this post.

What mission did have the fiction viewer issue you reported earlier? FSO should be able to handle UTF-8 files with a BOM and if that is not working then I would like to fix that.

[attachment stolen by Russian hackers]

Novachen:

--- Quote from: m!m on November 25, 2017, 03:35:21 pm ---What mission did have the fiction viewer issue you reported earlier? FSO should be able to handle UTF-8 files with a BOM and if that is not working then I would like to fix that.

--- End quote ---

Convert the h01.txt (News Room Headline) and/or m03.txt (Pre-Mission Text) in the fiction folder into UTF-8 with BOM and you can see a square at the beginning of the text in the News Room (available in the lower left in the Main Menu) or alternative in the Mission "Stierkampf" (bta1_m1_03.fs2). It is not there if this file is converted into UTF-8 without BOM.


--- Quote ---The issue you found in BtA should be fixed now. The builds in the first post have been updated.
--- End quote ---

I will check that out, especially there are some features in the missions itself i want to test out with it.

Novachen:
So another report.

I have tested several missions and i think that i tested every mission that use special features.
The system console in "Texas Seven" worked flawlessly as the Artillery HUD in "Murmeltiertag" and the tower defense section in "Angel".

Some missions with special HUD gauges needed only small changes in terms of entry lenghts, because the special characters need more bytes than in the original FS2. Would be interesting if proper translations of this kind of stuff is even possible in total different languages like Russian or Chinese where every character need more space by default. For languages like German this does not seem to be a big deal in general.

But i noticed a small strange error in the fiction viewer. In the first line of a text, things like the points over the characters like ä are not visible or seem to be more only half visible if you zoom in, but that is not the case in all the other lines.

I marked two examples in the screenshots. They should look the same, but they do not.

[attachment stolen by Russian hackers]

m!m:
I fixed the BOM issue in the fiction viewer, the builds in the first post have been updated. The cause was that the fiction viewer reads the file text without going through the parse system which handled the BOM skipping for all other files.

I cannot reproduce the issue you are showing in your screenshots but he text in my fiction viewer is much larger than in your screenshot so there may be a configuration difference. The font configuration specifies a top and bottom offset so it could be that you need to adjust those values by a pixel or two since the ä points are pretty high above the text in the font BtA is using.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version