GithubHelp home page GithubHelp logo

Comments (6)

afiller avatar afiller commented on August 19, 2024 1

Wouldn't it in general be easier to assume the file is UTF-8 (backwards compatible with ASCII) and use the UTF-8 encoding directly in the fs command?

fs.readFile(p, 'utf8', function (err, data) {...

UTF-8 support all "relevant" characters and also writing should be no problem then.

from marp.

yhatt avatar yhatt commented on August 19, 2024 1

@dabroder Thank your notification. I understood what is happening. (When opening file, your example is detected as Chinese: GB2312)

We would rather not like to do away with multi-encoding support for few strange cases. In that case, the reopening option sounds good.

My idea is to add File -> Reopen With Encoding submenu. VS Code & Sublime have similar approach. Would you have any idea?

from marp.

dabroder avatar dabroder commented on August 19, 2024 1

I like File -> Reopen With Encoding submenu.
Here is the list used by Atom

from marp.

dabroder avatar dabroder commented on August 19, 2024

Probably is 'jschardet' library bug

from marp.

dabroder avatar dabroder commented on August 19, 2024

Hello @yhatt, most editors encode .md in utf-8 by default, and offers options for reopen with encoding.

from marp.

yhatt avatar yhatt commented on August 19, 2024

@dabroder Work done. I have implemented File -> Reopen With Encoding menu in #53.

It would apply to the next release version (v0.0.9). I thank to your issue! 👍

from marp.

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.