ObjectVision / GeoDMS

Source code for the GeoDMS software
https://www.geodms.nl/
Other
7 stars 1 forks source link

from_utf does not work in some build environments. #679

Closed eoudejans closed 7 months ago

eoudejans commented 7 months ago

Specifically: from_utf('ÀÁÂÄÄÃÅ') results in an empty string when Built on OVSRV07, and 'AAAAAAA' when built on other machines.

eoudejans commented 7 months ago

but from_utf('ABCDEFG') works properly on OVSRV07.

eoudejans commented 7 months ago

Added item: /String/UnTiled/from_utf/testOC

To Operator.dms which tests:

parameter<bool> testOC:= from_utf(Source/special_characters/OC) == 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';

Where Source/special_characters/OC is defined as:

parameter<string> OC := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; // Ordinary Characters

eoudejans commented 7 months ago

image

eoudejans commented 7 months ago

image

MaartenHilferink commented 7 months ago

image

eoudejans commented 7 months ago

Stepping in function from_utf it became clear that the ICU backend was used in the failing case.

After clean install of dependencies via vcpkg, and making sure that boost-locale icu backend was not installed via vcpkg list icu that returned empty the problem is resolved:

image

MaartenHilferink commented 7 months ago

https://chat.openai.com/share/d5c0b438-7021-4105-994d-45f3ea64b871

MaartenHilferink commented 7 months ago

See also #144

eoudejans commented 7 months ago

Possibly related: https://github.com/boostorg/locale/issues/61

All unit tests now work after removing boost-locale icu backend. It turned out this backend caused empty returns on utf8 to CP1250 conversion using boost::locale::conv::from_utf.