You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For file paths, we are using UTF-8-based strings to support non-ASCII data such as Umlauts or Chinese letters.
Scene::saveToFile() accepts a const char* fileName and essentially passes it to fopen without change/encoding.
A simple const char* literal containing umlauts contains different data as a UTF-8 string with the same umlauts that gets its data passed into a const char* - which fopen doesn't seem to handle properly on Windows systems.
Here is a GTest that elucidates the problem:
TEST(ramses, saveToFile_withUmlauts) {
ramses::RamsesFramework ramsesFramework;
ramses::RamsesClient& client = *ramsesFramework.createClient("example client");
ramses::Scene* scene = client.createScene(ramses::sceneId_t(123u), ramses::SceneConfig(), "export scene");
std::filesystem::path path("saveToFile_äöü.ramses");
auto status = scene->saveToFile(path.generic_u8string().c_str(), false);
ASSERT_EQ(status, 0);
}
In this test case, Ramses would try and save a file with the filename saveToFile_äöü.ramses.
PS: Even const char* literals with Chinese letters don't work with Scene::saveToFile().
The text was updated successfully, but these errors were encountered:
Ramses Version: 27.0.115
For file paths, we are using UTF-8-based strings to support non-ASCII data such as Umlauts or Chinese letters.
Scene::saveToFile()
accepts aconst char* fileName
and essentially passes it tofopen
without change/encoding.A simple
const char*
literal containing umlauts contains different data as a UTF-8 string with the same umlauts that gets its data passed into aconst char*
- whichfopen
doesn't seem to handle properly on Windows systems.Here is a GTest that elucidates the problem:
In this test case, Ramses would try and save a file with the filename
saveToFile_äöü.ramses
.PS: Even
const char*
literals with Chinese letters don't work withScene::saveToFile()
.The text was updated successfully, but these errors were encountered: