Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Convert UTF8 output in the Terminal for searching UNIX
Finally UTF8 (especially for name of files) is OK and running with tcsh and Terminal well configured, and you can enter names with non-ASCII characters in the Terminal.

But when you look for a non-ASCII name in a file, like with my phones file, it is necessary to filter the UTF8 that tcsh generates to look for them in plain (macroman, perhaps) ASCII files. For example, here is my code for telefone.sh:

#!/bin/sh grep -i `echo $* | convert_utf82mac.pl`
~/Documents/private/Telist.txt | convert_mac2utf8.pl


That should be entered as one line, with a space between the end-tick (`) and the "~/Document..." bit.

tcsh yet has some bugs. I am using tcsh 6.12.00 (Astron) 2002-07-23 (powerpc-apple-darwin) options 8b, nls, dl, al, kan, sm, rh, color, dspm, filec, and it doesn't do well with line editing when non-ASCIIs are there, but it is worth the pain.

[robg adds: I haven't tested this one...]
    •    
  • Currently 3.40 / 5
  You rated: 5 / 5 (5 votes cast)
 
[5,491 views]  

Convert UTF8 output in the Terminal for searching | 0 comments | Create New Account
Click here to return to the 'Convert UTF8 output in the Terminal for searching' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.