[TxMt] Converting encoding using iconv as command

Hans-Jörg Bibiko bibiko at eva.mpg.de
Tue Jul 24 10:39:51 UTC 2007


On 24.07.2007, at 12:16, Takaaki Kato wrote:

> Hi,
> I'm trying to use iconv to convert a Shift-JIS document to UTF-8.  
> It's successful in Terminal, but not so in TextMate.
> The command I use in Terminal is:
> iconv -f shift-jis -t utf-8 text1.txt>text2.txt
> This converts the file successfully.
> In TextMate, I set up a command, using:
> iconv -f shift-jis -t utf-8 "$TM_FILEPATH"
> in Command(s) field.
> I set Save: Nothing
> Input: None
> Output: Replace Document

This doesn't work because the cryptic text in TM's window is utf-8 now!
There are dozens of ways.

one would be to write in a new TM window:

iconv -f shift-jis -t utf-8 /PATH/TO/file.txt | cat

and press CTRL+R


More information about the textmate mailing list