Windows 10: I have some files in Notepad Ansi Text Document. I cannot read them.

Discus and support I have some files in Notepad Ansi Text Document. I cannot read them. in Windows 10 Support to solve the problem; I have some files in Notepad Ansi Text Document in Windows 10. I cannot read them. I have tried changing the regional system info, but it is correctly... Discussion in 'Windows 10 Support' started by Stoutski, Jul 13, 2020.

  1. Stoutski Win User

    I have some files in Notepad Ansi Text Document. I cannot read them.


    I have some files in Notepad Ansi Text Document in Windows 10. I cannot read them. I have tried changing the regional system info, but it is correctly in English. What can I do?

    :)
     
    Stoutski, Jul 13, 2020
    #1
  2. ddelo Win User

    Unreadable non-ANSI characters in Notepad

    The problem:
    People living in countries, with languages including non-ANSI characters and want a full English Windows environment.
    If the user sets the System locale (Language for non-Unicode programs) to the country they live in, then many apps will check this setting and without giving the user any option, are installed with a localized interface, i.e. GUI based on the System locale, which might not be desirable.

    The apparent resolution is to change the System locale to English (US), which solves the apps interface issue, but because we’re talking about Microsoft Windows there is (as always…) an exception. In this case is Notepad…
    Notepad has ANSI (= ASCII & Extended ASCII) as its default setting for saving text files. If the text file contains non-ANSI characters then it gives a warning…which if you accidentally bypass and save the file with the ANSI encoding, all non-ANSI characters become unreadable.

    Being such a user, I have an English (US) installation and to avoid the localized app interface, I have set the System locale to English (United States).
    For some reason, which I haven’t found yet, before version 1803, I could save text documents with Greek (non-ANSI) characters and since I wasn’t getting the encoding warning (at least not that often) when saving the file, a lot of files with Greek characters were saved as ANSI and had no problem.

    This encoding issue has become stricter in 1803. My guess is the “Beta: Use Unicode UTF-8 for worldwide language support” setting that has been added when you change system locale has something to do with it. Either way this is, as stated, still in Beta, thus it doesn’t work as it supposed to, yet!

    So how to read all these text files with ANSI encoding, which contain non-ANSI characters, that are now unreadable?

    The solution:
    Step 1
    Go to: Settings > Time & Language > Region & Language > Related Settings > Administrative Language Settings (opens Control Panel) > System locale (Language for non-Unicode programs)

    Alternatively, for short, type in Windows search/Cortana:
    control.exe /NAME Microsoft.RegionalAndLanguageOptions /PAGE /p:"Administrative"

    and change the “System locale (Language for non-Unicode programs)” to the locale of the country you live in (Greece in my case).
    The system will need to reboot. Click Restart.

    Step 2
    Download the UnicodeConverter.zip, save and extract it on your Desktop. The zip file contains three scripts:
    CheckFileEncoding.ps1
    ConvertFilesToUnicode.ps1
    ConvertFilesToUnicode_NoBOM.ps1 (for advanced users)

    Step 3
    Open an elevated PowerShell and type the command:
    Code:
    Then type the following command (provided that you have saved the script in your Desktop):
    Code:
    The script will give you a list of all the ANSI text files, in all your user folders, as System.Text.ASCIIEncoding.

    You can check some with non-ANSI characters and verify that they are readable. (They should, since your locale is a non-ANSI one).

    Step 4
    Now you can run the command:
    Code:
    The script will:
    1. Create a backup folder in C:\Backup\ASCIItxtBackup and will save a backup of all ANSI files you have in your user folders
    2. Convert all ANSI files you have in your user folders to Unicode.

    After that, you can do again Step 3, to verify that there are no ANSI files in your user folders.

    Step 5
    Go to: Settings > Time & Language > Region & Language > Related Settings > Administrative Language Settings (opens Control Panel) > System locale (Language for non-Unicode programs)

    Alternatively, for short, type in Windows search/Cortana:
    control.exe /NAME Microsoft.RegionalAndLanguageOptions /PAGE /p:"Administrative"

    and change the “System locale (Language for non-Unicode programs)” to the English locale of your preference.
    The system will need to reboot. Click Restart.

    That was it. After your computer restarts and since all the text files are now saved in Unicode, they can be read with any System locale.

    Important Note:
    If you want to change either the backup location or the folders where the ANSI text files reside (e.g. search all C:\), open the script “ConvertFilesToUnicode.ps1” and as shown in the red box, in the image below, go to the section where we define the locations and change them according to your needs (e.g. $SourceDirectory = ‘C:\Personal\My Files’). Don’t forget to enclose the folder in quotes (e.g. ‘C:\Backup\My ASCII files’).


    I have some files in Notepad Ansi Text Document. I cannot read them. [​IMG]


    For Advanced Users
    Microsoft Notepad, saves all Unicode files with BOM (Byte Order Mark). In case you don’t want to use BOM in your Unicode text files, use the “ConvertFilesToUnicode_NoBOM.ps1”. It will do exactly what the “ConvertFilesToUnicode.ps1” does, but instead it will save the text file in any Unicode encoding without the BOM.

    Additionally, to change the Unicode encoding, to another format, in the convert section of the script change the Unicode in the “set-content $_.FullName -Encoding Unicode” part to any other of the available values:

    ‘ASCII’: Uses the encoding for the ASCII (7-bit) character set.
    ‘BigEndianUnicode’: Encodes in UTF-16 format using the big-endian byte order.
    ‘BigEndianUTF32’: Encodes in UTF-32 format using the big-endian byte order.
    ‘Default’: Encodes using the default value: ASCII.
    ‘Byte’: Encodes a set of characters into a sequence of bytes.
    ‘String’: Uses the encoding type for a string.
    ‘Unicode’: Encodes in UTF-16 format using the little-endian byte order.
    ‘UTF7:’ Encodes in UTF-7 format.
    ‘UTF8’: Encodes in UTF-8 format.


    Credits:
    The function Get-FileEncoding, 03-Feb-2015, by VertigoRay - Adjusted to use .NET's [System.Text.Encoding Class] (Encoding Class (System.Text))
     
    ddelo, Jul 13, 2020
    #2
  3. Nearus Win User
    Text documents reading off others

    Is there a way to have a text file (Notepad or Notepad ++) read of another as sort of a live feed.

    For Example I want some numbers of one document to then go to another one with better formatting I have made.
     
    Nearus, Jul 13, 2020
    #3
  4. Callender Win User

    I have some files in Notepad Ansi Text Document. I cannot read them.

    How to extract emails from notepad file ?

    Have you set it to "read only" or something? Try copying the contents to another file and see if they can be extracted from it. Maybe it's something to do with document encoding. Try saving as ANSI

    Also FYI I just created a test notepad .txt file ANSI encoding containing emails and the program extracted them no problem.

    Also try copying the notepad file's contents into a spreadsheet applicaiton (Excel or similar) using the "paste special" function to paste only unformatted text. Then save and try extracting from there.


    I have some files in Notepad Ansi Text Document. I cannot read them. [​IMG]
     
    Callender, Jul 13, 2020
    #4
Thema:

I have some files in Notepad Ansi Text Document. I cannot read them.

Loading...
  1. I have some files in Notepad Ansi Text Document. I cannot read them. - Similar Threads - files Notepad Ansi

  2. I can't make a text file with notepad in the file explorer

    in Windows 10 Network and Sharing
    I can't make a text file with notepad in the file explorer: I'm trying to create a text file using notepad in a folder on file explorer, but the option isn't there, there is just rich text which I don't want to use. How do i fix this? [IMG]...
  3. I have documents somewhere on windows 10. I need them medication some idiot changed the system

    in Windows 10 Network and Sharing
    I have documents somewhere on windows 10. I need them medication some idiot changed the system: Where can I find my documents? Need medical information https://answers.microsoft.com/en-us/windows/forum/all/i-have-documents-somewhere-on-windows-10-i-need/f17e33c0-db9b-46de-b276-a421009b4c1f
  4. I have a text document on my OneDrive, with all the passwords

    in Windows 10 Installation and Upgrade
    I have a text document on my OneDrive, with all the passwords: I was having some PC issues, and I wanted to wipe out everything. Before I started, I backed up everything to my OneDrive. Everything I had was very important! Once I was done, I re-install Windows 10. I was asked if I wanted to keep my files? I selected, nothing. I had...
  5. After linking my files to one drive they became read-only files and I cannot use them, I...

    in Windows 10 Network and Sharing
    After linking my files to one drive they became read-only files and I cannot use them, I...: After linking my files to one drive they became read-only files and I cannot use them, I was transferring files from my old laptop to my new one and now both laptops is messed up...
  6. How to allow text file read by specific application only such as notepad?

    in AntiVirus, Firewalls and System Security
    How to allow text file read by specific application only such as notepad?: How to allow text file read by specific application only such as notepad? Or other file read by specific application , other program can not read?...
  7. notepad text file.............how do I convert it to be in excel?

    in Windows 10 Software and Apps
    notepad text file.............how do I convert it to be in excel?: how do I convert a notepad text file into being an excel file? https://answers.microsoft.com/en-us/windows/forum/apps_windows_10-outlook_mail/notepad-text-filehow-do-i-convert-it-to-be-in/04af626b-2176-4693-8ea5-55376e4756fb
  8. text documents (*.txt) on notepad and it wont open

    in AntiVirus, Firewalls and System Security
    text documents (*.txt) on notepad and it wont open: my computer has been hacked and all of sudden they sent this text documents and it say push enter but it doesn't do anything. also does anyone know how to get the hackers off my computer... any help would be appreciated Moved from: Apps on Windows 10 / Other Windows...
  9. text documents (*.txt) on notepad and it wont open

    in Windows 10 Software and Apps
    text documents (*.txt) on notepad and it wont open: my computer has been hacked and all of sudden they sent this text documents and it say push enter but it doesn't do anything. also does anyone know how to get the hackers off my computer... any help would be appreciated...
  10. Unreadable non-ANSI characters in Notepad

    in Windows 10 Software and Apps
    Unreadable non-ANSI characters in Notepad: The problem: People living in countries, with languages including non-ANSI characters and want a full English Windows environment. If the user sets the System locale (Language for non-Unicode programs) to the country they live in, then many apps will check this setting and...