From 5f59c8ba64666125b70dc118aa698b60f81fef3a Mon Sep 17 00:00:00 2001 From: emild Date: Thu, 11 Jul 2024 17:51:11 +0200 Subject: [PATCH] modify UTF8toStr function to simply parse through the data as is --- PhotoshopAPI/src/Core/Struct/PascalString.h | 14 ++------------ python/CMakeLists.txt | 3 +-- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/PhotoshopAPI/src/Core/Struct/PascalString.h b/PhotoshopAPI/src/Core/Struct/PascalString.h index 86fc68fc..97c7401d 100644 --- a/PhotoshopAPI/src/Core/Struct/PascalString.h +++ b/PhotoshopAPI/src/Core/Struct/PascalString.h @@ -338,22 +338,12 @@ inline static std::string convertStrToUTF8(EncodingType encoding, const std::str } -/// Convert a utf-8 encoded string to another encoding. For the moment we simply map the ascii -/// characters and ignore any special character +/// Convert a utf-8 encoded string to another encoding. For the moment we simply parse the data through as is // --------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------- inline static std::string ConvertUTF8ToStr(EncodingType encoding, const std::string str) { - PROFILE_FUNCTION(); - std::string res = ""; - for (const auto& character : str) - { - if (static_cast(character) < 0x80) - { - res += character; - } - } - return res; + return str; } diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index f8666f96..de6ef942 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -2,8 +2,7 @@ # -------------------------------------------------------------------------- project(PhotoshopAPIPython) -file(GLOB_RE -CURSE MY_SOURCES CONFIGURE_DEPENDS "src/*.cpp") +file(GLOB_RECURSE MY_SOURCES CONFIGURE_DEPENDS "src/*.cpp") # Compile simdutf with position independent code as it otherwise wont compile on gcc ubuntu set_property(TARGET simdutf PROPERTY POSITION_INDEPENDENT_CODE ON)