Skip to content

IW4: Unknown issue when trying to use a localized .str file containing Russian words #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
diamante0018 opened this issue Oct 28, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@diamante0018
Copy link
Contributor

diamante0018 commented Oct 28, 2024

After a community member manually translated from English to Russian a lot of localized strings I built a fastfile using OAT (and ZB with the same result ). The fastfile yields corrupted strings in game

image

Under my <OAT>/zone_raw folder I have the following input which contains the .str file with Russian words

iw4x_localized_russian.zip

@diamante0018 diamante0018 changed the title IW4: Unknown issue when trying to use a localized fastfile containing Russian words IW4: Unknown issue when trying to use a localized .str file containing Russian words Oct 28, 2024
@Laupetin Laupetin added the bug Something isn't working label Jan 3, 2025
@Hadi77KSA
Copy link

Hadi77KSA commented Mar 22, 2025

This seems to be caused by the strings being saved in UTF-8 encoding instead of Cyrillic (Windows 1251) encoding, as the text when viewed in windows1251 encoding looks similar to the image you've provided as seen in the screenshot below.

Image

Try with the files in the zip below. I just copied the text from the utf8 encoding file to a windows1251 encoding file, and I believe it should work.
iw4x_localized_russian.zip

@diamante0018
Copy link
Contributor Author

May I ask for a short clarification?
So OAT is able to accept a windows1251 encoded file and that fixes the issue? That's kind of cool to know.
I think I'm short on time these days but at least I did my good deed by leaving issues and left as much info and source files as possible anyone can make a pr to the iw4x-rawfiles to fix it, I was left very unmotivated last time because my PRs to the iw4x's repo were left open for 3 months at least and further delayed because all the research to confirm my changes were working was lost it time and had to be redone.

@Hadi77KSA
Copy link

Hadi77KSA commented Mar 22, 2025

I think it's a quirk of the game itself. I know based on Black Ops 1 that the Japanese, Polish, and Russian languages don't appear as they would if you were to simply rename their files to try using them on a copy of the game running the English language for example, as they each have their own gamefonts_pc.iwi structure. So, you'd have to write the strings and save them with the correct encoding that the game would look for if you want them to appear properly. Here are some screenshots showing how they would appear in a copy running the English language:

Renaming a Russian file and attempting to use it on a copy running the English version
Image

Western (Windows 1252) encoding vs. Cyrillic (Windows 1251) encoding
Image

Renaming a Japanese file and attempting to use it on a copy running the English version
Image

Western (Windows 1252) encoding vs. Japanese (Shift JIS) encoding
Image

@diamante0018
Copy link
Contributor Author

@Hadi77KSA Hey, I moved forward with this issue. I tried to contact a few people with this message but they have not replied.

Image

https://cdn.alterware.ovh/utils/iw4x_localized_russian.ff

Would you like to try yourself with the above link if your game is in Russian to confirm we have decent translations with this? If this appears to no longer be an OAT issue i can add it to the OAT docs about this particular case but i'd like you to check out my fastfile which is from this PR too (fixed localized russian strings - replaces english with russian allegedly)

@diamante0018
Copy link
Contributor Author

I want to clarify that this appears to have already been confirmed as not an OAT issue, however, we could keep this issue open to facilitate the conversation and also help us merge the IW4x rawfiles PR. I could work on documenting that OAT can link localised language assets for languages that use non-ASCII characters, as long as the input files use the correct encoding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants