Giter VIP home page Giter VIP logo

Comments (5)

chrisant996 avatar chrisant996 commented on May 18, 2024 2

Funny story.

I observed several different strange problems with Unicode input. It took me a combined total of around 7 hours of debugging through low level details of Readline and Clink UTF8 processing for the various problems to finally track down the root cause:

Clink forgot to tell the C runtime that it wanted to use UTF8.

Readline asks the C runtime what locale to use, and the C runtime defaults to using the "minimal ANSI conforming environment for C translation", which is essentially an extended-ASCII pseudo-locale. So Clink was trying to talk UTF8, and Readline was trying to talk pseudo-ASCII.

A one line change seems to fix everything (I'm testing further to confirm). Plus I get to delete a bunch of code that had been unsuccessfully trying to compensate for not having this line:

        // Readline needs to know it should use UTF8.
        setlocale(LC_ALL, ".utf8");

from clink.

Slach avatar Slach commented on May 18, 2024 1

@chrisant996 thanks a lot for your efforts, all works fine now

from clink.

chrisant996 avatar chrisant996 commented on May 18, 2024

Thanks! Yes, I haven't worked on that yet. My intent is to include a fix in the first Beta build, provided a fix doesn't prove too invasive (in which case it might get deferred a little bit).

from clink.

chrisant996 avatar chrisant996 commented on May 18, 2024

I'm working on it now, but I'm running into a number of issues with the GNU Readline library along the way. This could take a while to get working properly, but it will get there eventually.

from clink.

chrisant996 avatar chrisant996 commented on May 18, 2024

Fixed by 004c691.
Binaries available here.

from clink.

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.