Community
    • Login

    Special characters not showing on some file on some computer

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    17 Posts 5 Posters 5.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Shenmue-is-lifeS
      Shenmue-is-life
      last edited by

      Hi,
      I have a txt file with special characters (such “é”). The txt reads fine on my computer. But when I read the file on my another computer, the special characters are corrupted (“?” characters).

      On both computers, Notepad is set to ANSI mode.

      PeterJonesP Paul WormerP 2 Replies Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Shenmue-is-life
        last edited by

        @Shenmue-is-life ,

        Are both computers set to use the same font in Notepad++?

        Shenmue-is-lifeS 1 Reply Last reply Reply Quote 0
        • Shenmue-is-lifeS
          Shenmue-is-life @PeterJones
          last edited by

          @PeterJones

          Yes they are.

          Neil SchipperN PeterJonesP 2 Replies Last reply Reply Quote 0
          • Neil SchipperN
            Neil Schipper @Shenmue-is-life
            last edited by

            @Shenmue-is-life It would be good to confirm that both computers are using identical files by reading the file from a USB (etc) flash drive (just in case you modified one in a different program without realizing the change to the encoding).

            Also:

            Same version of Notepad++ on both?

            Same O/S on both?

            Shenmue-is-lifeS 1 Reply Last reply Reply Quote 2
            • PeterJonesP
              PeterJones @Shenmue-is-life
              last edited by

              @Shenmue-is-life ,

              Compare the Notepad++ version numbers on each computer. Compare the Settings > Preferences > MISC settings on each (it could very well be influenced by a difference between “autodetect” or “directwrite” settings on the two computers)

              Other than that, my best answer, with the tiny bit of information you have shared, is “you have done something different on the two computers, or the files are different on the two computers.”

              If you would care to try to provide more details – the ?-menu’s Debug Info from each computer, screenshots of how each computer renders the characters, and the like, we might be able to come up with something more. But I have no more guesses.

              1 Reply Last reply Reply Quote 1
              • Shenmue-is-lifeS
                Shenmue-is-life @Neil Schipper
                last edited by

                @Neil-Schipper

                Same OS

                The Notepad version is different but only from a bit (8.1.1 and 8.1.2).

                File opened straight from a common server.

                Neil SchipperN 1 Reply Last reply Reply Quote 0
                • Neil SchipperN
                  Neil Schipper @Shenmue-is-life
                  last edited by

                  @Shenmue-is-life

                  Two more (rather pedestrian) thoughts:

                  First, toggle Show all symbols/characters (toolbar or menu-View) on for a moment and see if anything surprising shows up.

                  Second, the other guys here have sometimes asked people to issue a Windows console command to query which language or character set (or something) is in effect. Might be relevant. @PeterJones?

                  Neil SchipperN 1 Reply Last reply Reply Quote 0
                  • Neil SchipperN
                    Neil Schipper @Neil Schipper
                    last edited by

                    @Shenmue-is-life

                    The console command I was thinking of is chcp.

                    It probably should not be relevant to your anomaly but whenever something is happening that “should be impossible” it never hurts to explore factors vaguely connected to the disturbing observation.

                    1 Reply Last reply Reply Quote 0
                    • Shenmue-is-lifeS
                      Shenmue-is-life
                      last edited by

                      Thank you for your attention.
                      I hope I can give more details but for now, I can only talk about a curious bit I found.

                      I have a Windows shortcut of this file which is named “Clé.txt” (the one who contains the corrupted special characters).

                      However the original file is unloadable as the servers is currently down.

                      Windows 10 opens up a message reading something such “Can’t read the file” since the server is down. This pop-up window has a title. It reads “Cl?.txt”.

                      Might be the issue straight related with Windows 10, not Notepad?

                      Neil SchipperN 1 Reply Last reply Reply Quote 0
                      • Neil SchipperN
                        Neil Schipper @Shenmue-is-life
                        last edited by Neil Schipper

                        @Shenmue-is-life

                        (whispering) No one around here likes when you call Notepad++ “Notepad”!

                        … which makes me want ask: do the accented chars appear the same in Notepad.exe (on both computers)?

                        1 Reply Last reply Reply Quote 0
                        • Paul WormerP
                          Paul Wormer @Shenmue-is-life
                          last edited by

                          @Shenmue-is-life I would check on both computers what charmap.exe has to say:

                          768254ed-2365-4a22-94c6-cad071929063-afbeelding.png

                          ab508050-4e6c-44a5-80d4-a6c75e9f2c2f-afbeelding.png

                          eb2303fe-7b7b-45f0-933f-cb23355dd963-afbeelding.png

                          “DOS: United States” and “DOS: Western Europe” have é in the same position (130), but “Windows: Western” has it in position 233. Npp refers to “DOS: United States” as “OEM US”, to “DOS: Western Europe” as “OEM 850” and to “Windows: Western” as “Windows- 1252”.
                          c5bc0a65-3304-4719-9763-bb1d47510149-afbeelding.png

                          PeterJonesP 1 Reply Last reply Reply Quote 1
                          • PeterJonesP
                            PeterJones @Paul Wormer
                            last edited by

                            @Shenmue-is-life ,

                            Please note that some of what @Neil-Schipper and @Paul-Wormer have been hinting at you is that “ANSI” is not one monolithic encoding. Depending on what your Windows OS settings are, the “ANSI” can be any of the character-encodings. Recent Notepad++ versions include Current ANSI codepage : 1252 or equivalent in the ?-menu’s Debug Info, which is why I asked you to share your Debug Info days ago. (And this is also why I didn’t bother replying to Neil, because chcp will not tell you what default codepage Notepad++ inherited from Windows, but just what codepage your cmd.exe window is using; there are ways to change the cmd.exe codepage without changing the system default that Notepad++ sees, so I wasn’t going to bother with that suggestion.)

                            So just because both computers say “ANSI” doesn’t mean both are defaulting to the same encoding. And as Paul has shown (with those supersized images that bury his reply text), certain encodings put é at different codepoints, so if your file has one codepoint from one ANSI encoding, but the OS on the ? computer defaults to an encoding that doesn’t have a character at that codepoint, that might explain why Notepad++ is showing ?. (That’s one of the reasons that Unicode and the UTF-8/UTF-16 encodings exist – to avoid all the conflicting codepoints for the same character across the multitude of 1980s character sets. I don’t understand why anyone still uses any of the 256-codepoint character sets, since the alternative has existed since the 90s and been mainstream since the early 2000s; all these applications that still use “ANSI” for “backward compatibility” but use them by default so people don’t realize there is something better really annoy me. Just give in and make your customers do a one-time conversion of their text files to a Unicode encoding, and then just always use a Unicode encoding after that. Oh, sorry. End of Rant.)

                            (@Paul-Wormer, In the future, you might consider resizing the images with mspaint.exe or similar before pasting them; it took me two or three times through your post before I noticed your typing between some of those monsters.)

                            Alan KilbornA Neil SchipperN 2 Replies Last reply Reply Quote 3
                            • Alan KilbornA
                              Alan Kilborn @PeterJones
                              last edited by Alan Kilborn

                              @PeterJones said in Special characters not showing on some file on some computer:

                              (@Paul-Wormer, In the future, you might consider resizing the images with mspaint.exe or similar before pasting them; it took me two or three times through your post before I noticed your typing between some of those monsters.)

                              Another suggestion may be some appropriate highlighting. For me, it turned into a game of “spot the differences in these photos”, especially between the first and second screenshots – I had to work too hard to see that the difference was in the “character set” dropdown choice. It seems EASY now that I know this, but hindsight is 20/20.

                              Example, if I were posting several shots that were similar, I’d call attention to the differences with this type of mark-up:

                              3d6a16d3-1a52-4576-9901-d9ca2fa28fe2-image.png

                              Paul WormerP 1 Reply Last reply Reply Quote 2
                              • Neil SchipperN
                                Neil Schipper @PeterJones
                                last edited by

                                @PeterJones said in Special characters not showing on some file on some computer:

                                … some of what @Neil-Schipper and @Paul-Wormer have been hinting at you is that …

                                In my case it was more spitballing than hinting since I know precious little about these issues, and only wanted to help OP suss out evidence of something like a stomped upon registry entry.

                                In fact, I realized not very long ago that among files I typically have sitting my editor instances are 4 different line ending & encoding combos as shown on the status line:

                                Windows & UTF-8 (most of the newer files)
                                Windows & ANSI
                                Unix & ANSI
                                Unix & UTF-8

                                I copy & paste between them, and with other apps (spreadsheet, word processor, image editor, web browser forms) taking no special precautions. From time to time I’ll want to enter an omega (for ohms), or a nicer (longer than standard) dash, and somehow manage to hack it in from within npp or from another source. Or I’ll paste in something containing French or Spanish accented characters, and such like. Again, I don’t take any special precautions, and I tend to eventually see what I expect without touching the commands under Encoding. I don’t run into jams when I’m searching (although if I’m doing a fancy replace I’ve learned to check what line ending to use)… so these underlying file attributes are for me pretty much “who cares?”, and it seems like smart programmers have figured out how to insulate users from the legacy associated complexities, so it’s a bit baffling to me how much trouble others seem to have based on the frequency of posts on these topics that show up here.

                                1 Reply Last reply Reply Quote 0
                                • Paul WormerP
                                  Paul Wormer @Alan Kilborn
                                  last edited by Paul Wormer

                                  (@Paul-Wormer, In the future, you might consider resizing the images with mspaint.exe or similar before pasting them; it took me two or three times through your post before I noticed your typing between some of those monsters.)

                                  I apologize for the idiotic sizes, but I don’t understand where they come from. Today I compared the charmap, as it appears on my screen, with the screen dump that I published on this forum: The forum version is about 30% larger than the original. The MS-paint version of my screen dump has the size of the original, so if I would shrink it, it would look too small to me. Somehow my pasting to the forum enlarges the original. Pasting to MS-paint does not give any enlargement, but next time I will decrease the screen dumps anyway by 30%.

                                  Regarding the highlighting: I was a bit lazy and thought that the font names were evident and assumed that readers were familiar with charmap output.

                                  PS Now that I’m typing this I see that the letters in the two screens are also incredibly large. Do I somehow have a magnification set in my browser (Firefox)?
                                  PPS I submitted my text and compared my letter size with others, nothing unusual there.

                                  Alan KilbornA 1 Reply Last reply Reply Quote 0
                                  • Alan KilbornA
                                    Alan Kilborn @Paul Wormer
                                    last edited by

                                    @Paul-Wormer

                                    I presume you are taking screenshots using Win+Shift+s keycombo?

                                    Paul WormerP 1 Reply Last reply Reply Quote 0
                                    • Paul WormerP
                                      Paul Wormer @Alan Kilborn
                                      last edited by

                                      @Alan-Kilborn said in Special characters not showing on some file on some computer:

                                      @Paul-Wormer

                                      I presume you are taking screenshots using Win+Shift+s keycombo?

                                      Yes.

                                      1 Reply Last reply Reply Quote 1
                                      • First post
                                        Last post
                                      The Community of users of the Notepad++ text editor.
                                      Powered by NodeBB | Contributors