Mac awk can't process UTF-16 file

Discussion in 'macOS' started by mikezang, Oct 15, 2012.

  1. mikezang macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #1
    I use ibtool to create strings file from stroyboard file, this strings file is in UTF-16 format, now I found awk can't process it.
    when I run
    Code:
    awk '{print $0}' old.txt
    
    I got nothing as attachment. How can I process UTF-18 file?
     

    Attached Files:

  2. jeremysteele macrumors 6502

    Joined:
    Jul 13, 2011
    #2
    Not sure if it helps, but some searches brought up this. A workaround using conversion.

    I'm personally curious if awk, sed, etc work on utf-16 on linux even? Never actually tried that... hmm
     

Share This Page