If you need to convert polish letters with diacritical marks to UTF-8 codes, e.g. because of the file format standard requirements, you can use the below BASH script:
You can of course manipulate the $SWAP map to define your own set of characters you want to convert.
You’re right – I was more into writing this script on my own than thinking about already existing tools :-)
Althought at this moment I couldn’t make iconv to output me a UTF-8 codes out-of-the-box, I’ve found that there is also a tool especially aimed for Java properties purpose (so, not as flexible as iconv) – native2ascii (http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/native2ascii.html) and it’s even already in the JDK package :-)
Why use this script if there is iconv available already?
[1] http://en.wikipedia.org/wiki/Iconv
You’re right – I was more into writing this script on my own than thinking about already existing tools :-)
Althought at this moment I couldn’t make iconv to output me a UTF-8 codes out-of-the-box, I’ve found that there is also a tool especially aimed for Java properties purpose (so, not as flexible as iconv) – native2ascii (http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/native2ascii.html) and it’s even already in the JDK package :-)
Thanks for you comment!