Last active
August 18, 2021 06:23
-
-
Save sueharaluke/d6d3b65454fbdd9a1d21234c142028b6 to your computer and use it in GitHub Desktop.
Batch update encoding (ubuntu)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install nkf | |
$ sudo apt install nkf | |
// Batch update all .html files inside current directory | |
// To UTF-8 | |
$ find . -type f -name "*.html" -exec nkf -w --overwrite {} \; | |
// To SHIFT_JIS 半角が全角になる | |
$ find . -type f -name "*.html" -exec nkf -s --overwrite {} \; | |
// To SHIFT_JIS 半角がそのままでいい | |
$ find . -type f -name "*.html" -exec nkf -s -x --overwrite {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment