To help you guys see what characters are in the font files, as well as what the characters' indices are, I have ripped all of the characters from the font files. Here they are:
https://www.dropbox.com/s/3iwoymnmwpg9ydu/fs_font_chars.zip?dl=1The two versions of font01 are the most important here. In the regular font01 (the English one), you'll notice that all the characters up to index 126 are the ASCII characters. From index 127 onward are special symbols used mainly for the HUD. In the German version of the font (which I named font01-gr), those symbols start at index 164 (the accented characters appear
before that). Do 127 and 164 sound familiar to you? That's right, these numbers are the indices defined in localize.cpp and the new language definition structure. They specify the starting index of the special symbols, not the accented characters.
With that in mind, and considering that this feature was only recently committed, I propose renaming "Non-English Character Index" to something like "Special Character Offset" (similar to what it's called in localize.h, line 31) to make it less misleading.
EDIT:
the extension is used by the game to have extra folders which contain the foreign language files (i.e German voice acting etc.).
This seems to be broken, and it probably always has been. Based on the code and debug messages that I added (patch below), the game appears to apply language extensions in this manner:
[original path name]\[language extension]\[original file name]
example: data\voice\special\gr\message.wav
The patch below adds debug messages to the function that I believe is meant to add the language extension. When I tried it, the only messages generated from this that I saw had to do with font files, but the paths were anything but the fonts folder. Change the language setting to German, then try this patch out and then look at the debug log to see what I mean.
Index: code/localization/localize.cpp
===================================================================
--- code/localization/localize.cpp (revision 9774)
+++ code/localization/localize.cpp (working copy)
@@ -502,6 +502,7 @@
// maybe add localized directory to full path with file name when opening a localized file
int lcl_add_dir_to_path_with_filename(char *current_path, uint path_max)
{
+ mprintf(("Old path: %s\n", current_path));
// if the disk extension is 0 length, don't add enything
if (strlen(Lcl_languages[Lcl_current_lang].lang_ext) <= 0) {
return 1;
@@ -530,6 +531,7 @@
strcat_s(current_path, path_max, temp);
delete [] temp;
+ mprintf(("New path: %s\n\n", current_path));
return 1;
}