diff --git a/src/anm2/anm2_spritesheets.cpp b/src/anm2/anm2_spritesheets.cpp index 93972e8..3d27cfa 100644 --- a/src/anm2/anm2_spritesheets.cpp +++ b/src/anm2/anm2_spritesheets.cpp @@ -41,7 +41,7 @@ namespace anm2ed::anm2 labels.emplace_back(localize.get(BASIC_NONE)); for (auto& [id, spritesheet] : content.spritesheets) { - auto pathString = spritesheet.path.string(); + auto pathString = filesystem::path_to_utf8(spritesheet.path); labels.emplace_back(std::vformat(localize.get(FORMAT_SPRITESHEET), std::make_format_args(id, pathString))); } return labels; diff --git a/src/anm2/spritesheet.cpp b/src/anm2/spritesheet.cpp index 0a58717..accd8a4 100644 --- a/src/anm2/spritesheet.cpp +++ b/src/anm2/spritesheet.cpp @@ -45,7 +45,7 @@ namespace anm2ed::anm2 { auto element = document.NewElement("Spritesheet"); element->SetAttribute("Id", id); - auto pathString = path.generic_string(); + auto pathString = filesystem::path_to_utf8(path); element->SetAttribute("Path", pathString.c_str()); return element; } diff --git a/src/util/xml_.cpp b/src/util/xml_.cpp index 47299db..ef37a06 100644 --- a/src/util/xml_.cpp +++ b/src/util/xml_.cpp @@ -1,8 +1,10 @@ #include "xml_.h" +#include "filesystem_.h" #include "math_.h" using namespace tinyxml2; +namespace filesystem = anm2ed::util::filesystem; namespace anm2ed::util::xml { @@ -25,7 +27,7 @@ namespace anm2ed::util::xml { std::string temp{}; auto result = query_string_attribute(element, attribute, &temp); - if (result == XML_SUCCESS) *out = temp; + if (result == XML_SUCCESS) *out = filesystem::path_from_utf8(temp); return result; } @@ -35,4 +37,4 @@ namespace anm2ed::util::xml element->QueryIntAttribute(attribute, &value); out = math::uint8_to_float(value); } -} \ No newline at end of file +}