Using Uni2Me
- It's free but discontinued.
Using UTFCast
- Proprietary software
- Allows conversion from ANSI to UTF-8 with or without BOM
Using Python Script Plugin
from glob import glob
from Npp import notepad
globPath = "C:\MyFiles\*.txt"
for file in glob(globPath):
notepad.open(file)
notepad.runMenuCommand("Encoding", "Convert to UTF-8-BOM")
notepad.save()
notepad.close()- Start Macro recording
- Select Encoding > Convert to UTF-8-BOM
- Select all text and copy it (it's a bug otherwise it will replace file contents with Clipboard content)
- Save file and close it
echo -ne '\xEF\xBB\xBF' > utf8-no-bom.txt# Find all .txt files and convert them to UTF-8 (assuming US characters only / ANSI)
find *.txt -exec 'iconv -f CP1252 -t UTF-8 {} > {}'
# all Windows character sets
iconv -l | grep -i windowsfor i in `ls *.txt`; do
iconv -f WINDOWS-1252 -t UTF8 $i -o $i.utf8
mv $i.utf8 $i
doneChange in …; do with in $@; do to create a usable Bash file. (e.g. convert.sh myfile.txt myfile2.txt)
for %a in (*.txt) do nkf32 -W8 -w8 --overwrite "%a"Download binary for Windows • Source code
Note: Change -w8 with -w80 to remove BOM
for %a in (*.txt) do iconv -f CP1252 -t UTF-8 "%a" > "%a"- Using paid software Replace Pioneer
For the record, since Windows 10 version 1903, Notepad supports UTF-8 without BOM. (finally!)
Refs: Windows 10 Notepad is Getting Better UTF-8 Encoding Support