Skip to content

Commit

Permalink
modify UTF8toStr function to simply parse through the data as is
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilDohne committed Jul 11, 2024
1 parent 58f8491 commit 5f59c8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
14 changes: 2 additions & 12 deletions PhotoshopAPI/src/Core/Struct/PascalString.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned char>(character) < 0x80)
{
res += character;
}
}
return res;
return str;
}


Expand Down
3 changes: 1 addition & 2 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5f59c8b

Please sign in to comment.