-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmsMLUgetWide produce invalid string in LCMS2.9 (twice the expected length) #163
Comments
Please verify sizeof(wchar_t) on your compiler, it is quite posible it is 4 instead of 2. Then it is not UTF16. |
Thanks, didn't knew those subtleties. @Beep6581 Here is some info about forcing gcc to use 2 bytes |
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8dcf6793..8d25bdae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -376,6 +376,9 @@ if(OPTION_OMP)
endif()
endif()
+# Testing https://github.com/mm2/Little-CMS/issues/163
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fshort-wchar")
+
# check for libfftw3f_omp
include(CheckCSourceCompiles)
if(OPENMP_FOUND)
|
Not sure about what you are reporting here. The lcms function just reads the codes, with no interpretation. |
On this line of code,
count
is 84 in LCMS2.9 while it is 42 in 2.8. The examined profile is RTv2_ACES-SP0.icc andcmsSigDeviceModelDescTag
should containg2.400000s12.923100!
, which, in UTF-16, should be 42 byte long, inluding ending null chars.Few lines below,
g_utf16_to_utf8
fails to convert the 84 bytes' string (which seem logical).@mm2 Is it a regression from 2.8 which is working fine, or did we missed something ?
Issue reported on IRC by @Beep6581 , I'll make the change in RT code but @Beep6581 will test it (Linux).
The text was updated successfully, but these errors were encountered: