Git Product home page Git Product logo

Comments (5)

MichalStrehovsky avatar MichalStrehovsky commented on July 29, 2024

You're running into the FailFast, right? Yeah, zerolib does cut corners like that. This constructor has different behaviors depending on whether this is Windows or Linux (it's "current codepage to UTF-16" on Windows, and "UTF-8 to UTF-16" on Linux).

from bflat.

lucabol avatar lucabol commented on July 29, 2024

Well, it's not 'UTF-8 to UTF-16' on Linux, it is 'ASCII to UTF-16' (by design). It seems too limiting, even for zerolib. But perhaps you feel differently?

from bflat.

MichalStrehovsky avatar MichalStrehovsky commented on July 29, 2024

I'm not opposed to adding a helper for this. It might not be the only place where utf-8 to 16 would be useful.

from bflat.

lucabol avatar lucabol commented on July 29, 2024

I am keeping track of everything that 'feels like' zerolib in a single file. Perhaps worth doing a simple PR, or discussion, when I am finished.

In case you wonder ... I am playing around with exposing utf8 cmd line args in the spirit of utf8everywhere, moving on experimenting with a no-allocation programming model (as MISRA C), to finish with a linear allocator. At least, this is the rough idea, we'll see.

from bflat.

 avatar commented on July 29, 2024

On Windows, I think using the Windows API. On Linux, I think using libiconv. Don't write your own encoding converter.

from bflat.

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.