Encoding Converter
Small command line tool that I've used to convert my webpage from ISO-8859-2 to UTF-8.
This page was started probably in 2003 or 2004 and UTF encoding was not "default" back then. While I don't think ISO encoding is an issue for tomeko.net (mostly English and some Polish text), recently I had to migrate it to newer hosting plan due to OVH Perso being phased out and it was not compatible with default web server configuration. Easy to fix, but UTF-8 just seems safer now.
Specification
- specified folder (project/webpage) is scanned recursively
- it updates files in-place (create backup first!)
- extension to process is specified as a command line parameter (you might need to run it to more than one time for e.g. php and js)
- source files already valid as UTF-8 are left untouched
- code page of files that are not valid as UTF-8 is specified as a command line parameter using Windows code page identifier (https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers)
- list of converted (not skipped) files is shown in terminal
Usage
EncodingConverter.exe <target_directory_path> <extension> <source_codepage>
Examples:
EncodingConverter.exe C:\my_project php 28592
(ISO-8859-2 to UTF-8 for .php)
EncodingConverter.exe C:\my_project .txt 1252
(Windows-1252 to UTF-8 for .txt)
EncodingConverter.exe C:\my_project * 1250
(Windows-1250 to UTF-8 for all files)
Source + binary
- 2026.08.14: bin/EncodingConverter_0_1.zip