How does notepad.exe determine character encoding? Unicorn Meta Zoo #1: Why another podcast? ...

The weakest link

Does Mathematica have an implementation of the Poisson binomial distribution?

"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?

Double-nominative constructions and “von”

Is Diceware more secure than a long passphrase?

Where was the County of Thurn und Taxis located?

Why does Arg'[1. + I] return -0.5?

Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?

Which big number is bigger?

Multiple options vs single option UI

Check if a string is entirely made of the same substring

Scheduling based problem

Intern got a job offer for same salary than a long term team member

Drawing a german abacus as in the books of Adam Ries

Is Electric Central Heating worth it if using Solar Panels?

Bayes factor vs P value

How to avoid introduction cliches

Retract an already submitted recommendation letter (written for an undergrad student)

A Paper Record is What I Hamper

How to not starve gigantic beasts

`microtype`: Set Minimum Width of a Space

Is it possible to cast 2x Final Payment while sacrificing just one creature?

A faster way to compute the largest prime factor

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?



How does notepad.exe determine character encoding?



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraFirefox character encoding problemHow is character encoding inside Sakura done?Difference in utf-8 conversion for multibyte charactersVim encoding issue with danish characters æøåHow can I enforce so Notepad++ uses UTF-8 every time I create a new file?ANSI file with charSet with latin characterrsync from Solaris to Windows (character encoding on filenames)How to determine character set, code page, or encoding in windows?Binary encoding formatsWindows command line to concatenate multiple UTF-8 files with BOM using





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have a .txt file saved in UTF-8 format without a BOM. It contains an 'é' character.



How does notepad.exe determine that it is UTF-8 encoded?



Other .txt files containing only < 0x80 characters are opened as "ANSI" encoding.










share|improve this question





























    0















    I have a .txt file saved in UTF-8 format without a BOM. It contains an 'é' character.



    How does notepad.exe determine that it is UTF-8 encoded?



    Other .txt files containing only < 0x80 characters are opened as "ANSI" encoding.










    share|improve this question

























      0












      0








      0








      I have a .txt file saved in UTF-8 format without a BOM. It contains an 'é' character.



      How does notepad.exe determine that it is UTF-8 encoded?



      Other .txt files containing only < 0x80 characters are opened as "ANSI" encoding.










      share|improve this question














      I have a .txt file saved in UTF-8 format without a BOM. It contains an 'é' character.



      How does notepad.exe determine that it is UTF-8 encoded?



      Other .txt files containing only < 0x80 characters are opened as "ANSI" encoding.







      windows character-encoding






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 23 hours ago









      litlit

      3081315




      3081315






















          1 Answer
          1






          active

          oldest

          votes


















          2














          According to Raymond Chen:




          Some files come up strange in Notepad



          [...] When faced with a file that lacks a special prefix, Notepad is forced to guess which of those two encodings the file actually uses. The function that does this work is IsTextUnicode, which studies a chunk of bytes and does some statistical analysis to come up with a guess.



          And as the documentation notes, “Absolute certainty is not guaranteed.” Short strings are most likely to be misdetected.




          (Related follow-up blog post.)






          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1429221%2fhow-does-notepad-exe-determine-character-encoding%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            According to Raymond Chen:




            Some files come up strange in Notepad



            [...] When faced with a file that lacks a special prefix, Notepad is forced to guess which of those two encodings the file actually uses. The function that does this work is IsTextUnicode, which studies a chunk of bytes and does some statistical analysis to come up with a guess.



            And as the documentation notes, “Absolute certainty is not guaranteed.” Short strings are most likely to be misdetected.




            (Related follow-up blog post.)






            share|improve this answer




























              2














              According to Raymond Chen:




              Some files come up strange in Notepad



              [...] When faced with a file that lacks a special prefix, Notepad is forced to guess which of those two encodings the file actually uses. The function that does this work is IsTextUnicode, which studies a chunk of bytes and does some statistical analysis to come up with a guess.



              And as the documentation notes, “Absolute certainty is not guaranteed.” Short strings are most likely to be misdetected.




              (Related follow-up blog post.)






              share|improve this answer


























                2












                2








                2







                According to Raymond Chen:




                Some files come up strange in Notepad



                [...] When faced with a file that lacks a special prefix, Notepad is forced to guess which of those two encodings the file actually uses. The function that does this work is IsTextUnicode, which studies a chunk of bytes and does some statistical analysis to come up with a guess.



                And as the documentation notes, “Absolute certainty is not guaranteed.” Short strings are most likely to be misdetected.




                (Related follow-up blog post.)






                share|improve this answer













                According to Raymond Chen:




                Some files come up strange in Notepad



                [...] When faced with a file that lacks a special prefix, Notepad is forced to guess which of those two encodings the file actually uses. The function that does this work is IsTextUnicode, which studies a chunk of bytes and does some statistical analysis to come up with a guess.



                And as the documentation notes, “Absolute certainty is not guaranteed.” Short strings are most likely to be misdetected.




                (Related follow-up blog post.)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 23 hours ago









                grawitygrawity

                245k37516576




                245k37516576






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1429221%2fhow-does-notepad-exe-determine-character-encoding%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

                    Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                    VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...