Changing text encoding?

Discussion in 'Mac Basics and Help' started by AlphaBoy85, May 1, 2016.

  1. AlphaBoy85 macrumors regular

    Joined:
    Mar 25, 2008
    Location:
    Earth.
    #1
    Is there any way that I could change multiple text files encoding to UTF8 thru Automator?

    Thank you gents!
     
  2. Waragainstsleep macrumors regular

    Joined:
    Oct 15, 2003
    Location:
    UK
  3. AlphaBoy85 thread starter macrumors regular

    Joined:
    Mar 25, 2008
    Location:
    Earth.
    #3
    I am sorry, what is a Shell script?

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

    Thanks a lot!
     
  4. richard2 macrumors regular

    richard2

    Joined:
    Oct 21, 2010
    Location:
    England, United Kingdom
    #4
    What is the current encoding of the text files?
     
  5. AlphaBoy85 thread starter macrumors regular

    Joined:
    Mar 25, 2008
    Location:
    Earth.
    #5
    Windows
     
  6. richard2 macrumors regular

    richard2

    Joined:
    Oct 21, 2010
    Location:
    England, United Kingdom
    #6
    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 "$@"
     
  7. AlphaBoy85 thread starter macrumors regular

    Joined:
    Mar 25, 2008
    Location:
    Earth.
    #7
    Thanks a lot!!!
     

Share This Page