A memorandum on how to browse files without garbled characters
(1) Execute the following command
nkf --guess filename
nkf --guess hoge.php
(1) Execute the following command
cat file name|nkf character code specification (input related)
cat hoge.php | nkf -E
| option | Character code |
|---|---|
| -J | ISO-2022-JP |
| -E | EUC-JP |
| -S | Shift-JIS |
| -W,-W8 | UTF-8 |
| -W16 | UTF-16 (little endian) |
| -W16B | UTF-16 (Big Endian) |
Recently, I often encounter problems that are garbled and unreadable, so I made it available immediately.
Recommended Posts