You have opened a text file in standard Notepad Windows 10, and instead of the usual letters - a meaningless set of squares, question marks or Chinese characters? This problem is familiar to many users, especially when working with files created on other devices or in alternative text editors. The reason lies in encoding mismatch — the way a computer interprets characters in a file.
In 90% of cases the encoding is to blame UTF-8, which Windows 10 Notepad does not recognize correctly by default when opening files saved on other systems (for example, Linux or macOS). But there are other scenarios: damaged files, errors during network transmission, or even virus activity. In this article we will look at all possible reasons the appearance of hieroglyphs and give step-by-step instructions for eliminating them - from the simplest actions to advanced methods for experienced users.
Why does Notepad show hieroglyphs instead of text?
The root of the problem lies in encoding mismatch — a set of rules by which characters are converted to binary code and vice versa. When Notepad opens a file, it "thinks" the text is encoded in one system (for example, Windows-1251), but in fact another one is used (for example, UTF-8). As a result, instead of letters you see:
- 🔲 Squares or empty characters (a sign of a completely unreadable encoding).
- 📜 Chinese/Japanese characters (typical for
UTF-8, open asANSI). - ❓ Question marks or diamonds with questions (signal of lost characters).
- 🗑️ A mixture of letters and garbage (partially damaged file).
Main reasons:
- The file is saved in UTF-8 without BOM - a modern encoding standard that Windows 10 Notepad does not always recognize.
- Transferring a file between different OSes (for example, with Mac on Windows or from Linux).
- File corruption when downloading from the Internet, copying from a flash drive or disk error.
- Viral activity — some malware deliberately corrupts file encoding.
- Errors in Notepad itself (rare, but occurs after Windows updates).
Interestingly, the problem occurs more often with files containing Cyrillic alphabet or special characters (for example, €, ©). English text in UTF-8 Notepad sometimes opens correctly, but Russian almost always turns it into hieroglyphs.
- UTF-8
- Windows-1251
- KOI8-R
- Other
- I don't know
Method 1: Save the file in the correct encoding
The simplest solution is force the file to be saved in an encoding that Notepad understands. To do this:
- Open the problematic file in Notepad.
- Click
File → Save As.... - At the bottom of the save window, find the field Encoding and select:
| Situation | Recommended encoding | Note |
|---|---|---|
| File with Russian text | ANSI (Windows-1251) |
Old but reliable encoding for Windows |
| File with English text + special characters | UTF-8 |
Choose with BOM (byte order mark) |
| File from Linux/macOS | UTF-8 or Unicode |
Try both |
| File from a web page or database | UTF-8 |
Most often used on the Internet |
If after saving the text is still unreadable, try a different encoding option. For example, for files from old programs (For example, 1C 7.7) may be required OEM 866.
⚠️ Attention: When saving toANSIsome characters (for example,—,«»,€) can be replaced by?. In this case useUTF-8.
☑️ Checking file encoding
Method 2: Using Alternative Text Editors
The standard Windows 10 Notepad has limited capabilities for working with encodings. If the first method did not help, use specialized editors, which automatically detect the encoding and offer correction options:
- 📝 Notepad++ — a free editor with support for dozens of encodings. Automatically detects
UTF-8,ANSI,Unicodeetc. - 💻 Visual Studio Code — a powerful tool with a built-in encoding detector. Highlights problems in the lower right corner.
- 📄 Sublime Text - lightweight editor with support
UTF-8,UTF-16,Windows-1251. - 🔧 AkelPad — a compact alternative to Notepad with advanced encoding settings.
Instructions for Notepad++:
- Open the file in the program.
- From the menu, select
Encodings → Convert to ANSIorConvert to UTF-8. - If the text is still unreadable, try
Encodings → Define encoding(plugin Encoding Detector).
For Visual Studio Code:
- Open the file. The current encoding will appear in the lower right corner (for example,
UTF-8orWindows-1252). - Click on it and select
Reopen with Encoding, then tryWindows-1251orUTF-8 with BOM.
⚠️ Attention: When opening a file in Notepad++ or VS Code don't save it right away — first check that the text is displayed correctly. Some editors automatically change the encoding when saving.
If you often work with files in different encodings, add Notepad++ to the Windows context menu. To do this, select the "Associate to Notepad++" option during installation.
Method 3: Convert encoding via command line
For advanced users there is a way to fix the encoding without installing additional programs - using built-in Windows utilities. We will use PowerShell And iconv (the latter will have to be downloaded separately).
Method 1: PowerShell (no software installation)
- Open
PowerShellas administrator (clickWin + Xand selectWindows PowerShell (Administrator)). - Enter the command to read the file in
UTF-8and saving inANSI:Get-Content -Encoding UTF8 "C:\путь\к\файлу.txt" | Out-File -Encoding Default "C:\путь\к\новому_файлу.txt" - Replace the paths with the current ones. If you need it the other way around (from
ANSIinUTF-8), use:Get-Content -Encoding Default "C:\путь\к\файлу.txt" | Out-File -Encoding UTF8 "C:\путь\к\новому_файлу.txt"
Method 2: iconv utility (requires installation)
- Download iconv for Windows (for example, with GNUWin32).
- Unpack the archive and add the path to
iconv.exeinto a variablePATH(or run the utility from the folder). - Run the command to convert:
iconv -f UTF-8 -t WINDOWS-1251 input.txt > output.txtwhere
-f- source encoding,-t- target.
These methods are useful for batch processing - for example, if you need to transcode hundreds of files in a folder. To do this, use a loop in PowerShell:
Get-ChildItem "C:\путь\к\папке\*.txt" | ForEach-Object {Get-Content -Encoding UTF8 $_.FullName | Out-File -Encoding Default ("C:\выход\" + $_.Name)
}
⚠️ Attention: When converting via command line always create a new file instead of overwriting the original. An error in the command can lead to data loss!
How to add iconv to PATH?
1. Download and unpack the archive from iconv.
2. Copy the folder path from iconv.exe (For example, C:\iconv\bin).
3. Open Control Panel → System → Advanced System Settings → Environment Variables.
4. In the "System Variables" section, find Path, click "Edit" and add the copied path.
5. Save and restart the command prompt.
Method 4: Recovering damaged files
If the hieroglyphs appeared due to file corruption (for example, after a copying failure or a virus attack), standard methods of changing the encoding will not help. In this case:
- 🔍 Check the file for viruses with the help Kaspersky Virus Removal Tool or Dr.Web CureIt!. Some malware deliberately corrupts the encoding.
- 💾 Restore the previous version of the file (if Windows backup is enabled). To do this:
- Right click on the file →
Properties→ tabPrevious versions. - Select the latest working version and click
Restore.
- 📥 Use text recovery programs, for example:
| Program | Features | Link |
|---|---|---|
| Recuva | Recovers deleted or damaged files | ccleaner.com |
| R-Studio | Deep disk analysis, file structure restoration | r-studio.com |
| Hex Editor Neo | Manually fixing bad sectors in a file (for experienced ones) | hhdsoftware.com |
If the file is partially damaged, try opening it in WordPad (included with Windows) - sometimes it copes with reading where Notepad is powerless. You can also try import text into Microsoft Word:
- Open Word.
- Go to
File → Openand select the problematic file. - In the import window, select the encoding
Otherand try the options (Cyrillic (Windows),Unicode (UTF-8)).
If the file is important, don't edit it directly - create a backup first. Damaged files may become permanently damaged if saved unsuccessfully.
Method 5: Set Notepad as default (Windows 10 1903 and later)
In updated versions of Windows 10 (starting with May 2019 Update, version 1903) Notepad received support UTF-8. However, by default it still opens files in ANSI. To fix this:
- Open
Windows Settings(Win + I). - Go to
Applications → Default Applications. - Find
Notepadand pressAdditional options. - Enable the option "Always save in UTF-8".
If this option is not available, update Windows to the latest version or use registry editor:
- Click
Win + R, enterregeditand pressEnter. - Follow the path:
HKEY_CURRENT_USER\Software\Microsoft\Notepad - Create a new parameter
DWORD (32-bit)with namefSaveUnicodeand meaning1. - Create another parameter
DWORD (32-bit)with nameiDefaultEncodingand meaning1(forUTF-8) or0(forANSI).
After these steps, Notepad will be automatically save new files in UTF-8, but old ones may still not open correctly. For these, use the methods from the previous sections.
Method 6: Check and fix system fonts
It's rare, but it happens that hieroglyphs appear due to damaged system fonts, responsible for displaying text. This manifests itself not only in Notepad, but also in other programs. To check:
- Open
Control Panel → Fonts. - Make sure the standard fonts are present:
Arial,Times New Roman,Courier New,Lucida Console. - If fonts are missing, restore them via
DISM:DISM /Online /Cleanup-Image /RestoreHealth
You can also reset the font cache:
- Close all programs.
- Delete files in the folder:
C:\Windows\ServiceProfiles\LocalService\AppData\Local\FontCache - Restart your computer.
If the problem persists, try replace default font in Notepad:
- Open Notepad and enter any text.
- Click
Format → Fontand selectConsolasorLucida Console. - Save the file and check if the hieroglyphs have disappeared.
Method 7: Check for hardware errors
If hieroglyphs appear in all files, including newly created ones, the problem may be related to hardware failures:
- 💽 Damaged hard drive - check disk health using CrystalDiskInfo or commands:
wmic diskdrive get statusStatus
OKmeans the disk is ok. If there are errors, usechkdsk:chkdsk C: /f /r - 🖥️ RAM errors — run the test:
mdsched.exeand restart your computer to check.
- 🔌 Cache problems - reset Windows cache:
ipconfig /flushdns(sometimes helps with network errors affecting files).
If tests show errors, backup your data immediately and contact the service center. A damaged disk can permanently fail, rendering files unrecoverable.
⚠️ Attention: Don't ignore SMART disk errors (For example,Reallocated Sectors CountorPending Sectors). These are signs of imminent hard drive failure!
FAQ: Frequently asked questions about hieroglyphs in Notepad
Why do hieroglyphs appear only in some files?
It depends encodings, in which the file was originally saved. For example, files from Linux often used UTF-8 without BOM, and Windows Notepad by default opens them as ANSI. Files created in Windows for Windows, usually open correctly.
Is it possible to automatically convert all files in a folder?
Yes, with the help PowerShell or Total Commander:
B Total Commander:
- Select files (
Ctrl + A). - Click
Files → Batch rename. - At the bottom of the window, select
Convert → Encodingand indicate the source/target.
B PowerShell (example for UTF-8 → ANSI):
Get-ChildItem "C:\путь\*.txt" | ForEach-Object {$content = Get-Content -Encoding UTF8 $_.FullName
$content | Out-File -Encoding Default ("C:\выход\" + $_.Name)
}
Why are some characters replaced with "?" after conversion?
This happens when target encoding does not support some characters. For example, when converting from UTF-8 in ANSI are lost:
- Symbols
—,«»,…(replaced by?). - Special characters like
€,©,®. - Some letters from the extended Cyrillic alphabet (for example,
Yoin old encodings).
Solution: use UTF-8 to save or select an encoding that supports the desired characters (for example, Windows-1251 for Russian text).
How can I find out what encoding a file is saved in?
There are several ways:
- Notepad++: open the file → look at the encoding in the status bar (at the bottom of the window).
- Command line (for experienced ones):
chcp 65001 & type "файл.txt"If the text is readable - encoding
UTF-8. - Online services, for example, encoding.tools.
Can an antivirus cause encoding problems?
Yes, some antiviruses (for example, Avast, ESET NOD32) scan files in real time and can damage their structure, especially if the file is encrypted or packed. To check:
- Temporarily disable your antivirus.
- Copy the problematic file to another folder.
- Try opening a copy - if the hieroglyphs have disappeared, add the folder with the files to your antivirus exclusions.