Body:
Hello everyone,
I’m having a persistent issue with ScaleForm (GFx) resource loading and I’m hoping someone with ScaleForm experience can help.
My client works correctly when installed in an English-only path, but fails when the installation path contains Chinese characters.
In the Chinese-path case, Chinese text becomes garbled or rendered as squares, even though the same text displays correctly in an English path.
What works
Text encoding has been verified:
Client strings are converted from GBK / ANSI to UTF-8 before being passed to ScaleForm.
In an English directory, Chinese text displays correctly.
Fonts are correctly configured:
$NormalFont is mapped to Arial Unicode MS
The font files load and render correctly in non-Chinese paths.
fontconfig.txt and font libraries are valid.
What fails
When the client is installed in a directory containing Chinese characters, ScaleForm fails to load resources correctly:
.gfx files
fontconfig.txt
fontlib (.swf) files
images referenced by ScaleForm
As a result:
Fonts fall back or fail to load
Chinese text appears as garbled characters or squares
Using GetShortPathNameW does not produce an ASCII short path (8.3 names appear to be disabled on the disk).
Loading resources via absolute UTF-8 paths also fails.
ScaleForm appears to rely on ANSI file APIs or relative paths internally, which do not handle non-ASCII paths.
Key observation
If I temporarily change the current working directory to the ScaleForm resource folder, loading may succeed —
but this breaks other parts of the client that rely on the working directory (e.g. UI textures loaded via relative paths).
My understanding so far
It seems that ScaleForm.dll internally uses ANSI file access (e.g. fopen, CreateFileA) and relative paths, which causes all resource loading to fail when the base path contains non-ASCII characters.
What I’m asking for
Is there a proper way to set a resource root / content path in ScaleForm so that it can load files using Unicode paths?
Is there a documented or recommended way to make ScaleForm fully Unicode-path safe?
Or is the only reliable solution to ensure all ScaleForm resources are accessed through ASCII-only paths (e.g. via a virtual drive or external resource directory)?
Any guidance, documentation, or experience with this issue would be greatly appreciated.
Thank you very much for your time and help!
https://ibb.co/YBz6C1NW
https://ibb.co/b5R94GqZ
Em config.ini no cliente, mude para: font-conf-index = -1
Title: ScaleForm.dll cannot read config.ini when client is installed in a Chinese path
Description:
I’m encountering an issue where config.ini cannot be read when the client is located in a Chinese (non-ASCII) directory path.
When the game is installed in a path containing Chinese characters, any modification to config.ini has no effect at all.
When the exact same client is moved to a pure English/ASCII path (e.g. D:\MUClient\), everything works perfectly and all configuration changes take effect immediately.
Because of this behavior, it strongly appears that ScaleForm.dll does not support Unicode / non-ASCII file paths, and is likely using ANSI APIs internally (such as LoadFile, fopen, or CreateFileA) instead of wide-character versions.
What I have confirmed:
The config file exists and is correctly formatted.
The client logic itself is unchanged.
Only the installation path (Chinese vs English) affects whether config.ini is read.
Other resources behave similarly when accessed through ScaleForm.
Conclusion:
This seems to be a ScaleForm.dll path encoding limitation, not a configuration or logic error.
Question:
Is there a known workaround for ScaleForm with Unicode paths?
Is there a patched or rebuilt version of ScaleForm.dll that supports wide-character paths?
Or is the only solution to force the game to run from an ASCII-only directory?
Any guidance or experience would be greatly appreciated.
Thank you for your help.