Changing text encoding?

AlphaBoy85

macrumors regular
Original poster
Mar 25, 2008
197
0
Earth.
Is there any way that I could change multiple text files encoding to UTF8 thru Automator?

Thank you gents!
 

AlphaBoy85

macrumors regular
Original poster
Mar 25, 2008
197
0
Earth.
I am sorry, what is a Shell script?

How can I use this "Shell script"? Kindly explain.

Thanks a lot!
 

richard2

macrumors regular
Oct 21, 2010
236
51
England, United Kingdom
Windows has many different character encodings. Assuming the encoding is Windows-1252 (the most common one), the following Automator action should transcode the text to UTF-8:

Note: Ensure that you create a backup of the input files before you run the workflow.

Run shell script

Shell: /bin/bash
Pass input: As arguments

iconv -f WINDOWS-1252 -t UTF-8 "$@"
 
  • Like
Reactions: AlphaBoy85

AlphaBoy85

macrumors regular
Original poster
Mar 25, 2008
197
0
Earth.
Windows has many different character encodings. Assuming the encoding is Windows-1252 (the most common one), the following Automator action should transcode the text to UTF-8:

Note: Ensure that you create a backup of the input files before you run the workflow.

Run shell script

Shell: /bin/bash
Pass input: As arguments

iconv -f WINDOWS-1252 -t UTF-8 "$@"
Thanks a lot!!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.