Code Monkey home page Code Monkey logo

Comments (4)

stasoid avatar stasoid commented on June 2, 2024

You are on Windows and you are using litehtml_to_wchar/utf8_to_wchar in your container, right? Those functions incorrectly work with Unicode characters above 0xFFFF on Windows.

from litehtml.

tordex avatar tordex commented on June 2, 2024

Just checked this issue on Windows. Actually litehtml converts from/to UTF-32. On Linux sizeof(wchar_t) == 4, on Windows sizeof(wchar_t) == 2. That's why there are issues with unicode characters above 0xFFFF on Windows.

Replaced wchar_t with char32_t and renamed utf8_to_wchar to utf8_to_utf32 and whar_to_utf8 to utf32_to_utf8

from litehtml.

stasoid avatar stasoid commented on June 2, 2024

Nice. Finally all vestiges of wchar_t are eradicated.

from litehtml.

georgehazan avatar georgehazan commented on June 2, 2024

@stasoid @tordex thanks for the fix, but there're also 5-6 bytes long utf-8 sequences, so anyway you'd have to deal with UTF32-LE instead of UTF16-LE in the previous case

from litehtml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.