Open vfabioux opened 6 years ago
Great bug report, thank you -- especially for the test archive. I can't promise when I'll find time to investigate, but this is definitely something I'd like to work right.
Apologies for taking so long. Windows development always seems to come last for me. On Unix based platforms, this already seems to work automatically, both in binary and non-binary modes:
But at least now I know that the main remaining work for 0.9.6 is to sit down in front of my Win10 box and stubbornly chug through a bunch of Microsoft documentation and get familiar with the Visual Studio debugger.
I hate to say I just happened across the following today in the gltf 2.0 spec: "All strings defined in this spec (properties names, enums) use only ASCII charset and must be written as plain text" and "Implementation Note: This allows generic glTF client implementations to not have full Unicode support. " Not having Unicode support (beyond just the ASCII portion) is so short sited. For me it almost makes gltf an absolute non-starter. =(
@jmo7 That statement refers only to property names, not values.
{
"name": "value"
}
So in the JSON above, if name
is defined in the spec, it only uses ASCII symbols for spelling "name".
value
can be anything of UTF-8.
Is there any ETA for this bug?
The converter currently does not support UTF-8 characters.
When the file name has UTF-8 characters in it, an error is thrown. Example with "utf8 test é à ù è ò.fbx" file: "ERROR:: Failed to parse FBX: .\models\utf8 test Ú Ó ¨ Þ ‗.fbx" This can be fixed easily by the user by renaming the file.
When objects (meshes, animation groups, etc) have UTF-8 characters in their name, they are converted to ASCII characters. For example, "Sphère" is converted to "Sphère". I didn't find a way to convert the output file to UTF-8 (using Notepad++ conversion for example breaks the file).
Solutions: 1) Change how strings are handled in the app (maybe too hard to do) and export GLTF/GLB files with UTF-8 encoding (not sure if possible with the GLTF specs). 2) Or do a best effort conversion to ASCII by mapping UTF-8 specific characters to their ASCII counterpart (for example: "é" to "e", "à" to "a", etc). This would ensure that output names are at least human readable. "Sphère" output would then be "Sphere" instead of "Sphère". 3) Or document this limitation in the docs. Best effort conversion should then be done on the FBX file by the user before converting it.
FBX files for testing: utf8 test.zip