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 windows
for i in `ls *.txt`; do
iconv -f WINDOWS-1252 -t UTF8 $i -o $i.utf8
mv $i.utf8 $i
done
Change 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