[TxMt] Re: sort files with non-latin characters
Matt Neuburg
matt at tidbits.com
Fri Aug 21 15:30:26 UTC 2009
On 8/21/09 7:58 AM, in article 4A8EB617.3030900 at macfreek.nl, "Freek
Dijkstra" <public at macfreek.nl> wrote:
> Steps to reproduce
> 1. Open new text file.
> 2. Add text with a EURO symbol, e.g.
> aaa €
> bbb ¥
> ccc $
> ddd £
> 3. sort the file with F5 (Text > Sorting > Sort lines in document)
>
> I get the error:
> sort: string comparison failed: Illegal byte sequence
> sort: Set LC_ALL='C' to work around the problem.
> sort: The strings compared were `AAA \302\202\254' and `BBB ¥'.
>
> Most non-Latin characters work fine. Just this one fails. If I save the
> file and simply run "sort test.txt" all is fine. Both in my shell and in
> TextMate, "echo $LC_ALL" return "en_GB.UTF-8".
I tried your "steps to reproduce" and couldn't reproduce. :) The text sorted
fine for me. I changed "aaa" to "fff" to make sure it really *was* sorting
and it was.
On my machine, $LC_ALL has no value. However, I notice that in my
environment (type "set" at the command line), LANG=en_US.UTF-8, and in my TM
shell environment, LC_CTYPE=en_US.UTF-8. Perhaps it is one of these that you
need to set.
Also make sure that in TM's Advanced pref pane the default file encoding is
set to UTF-8...?
Just an idea. Sorry if it doesn't help. m.
--
matt neuburg, phd = matt at tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
More information about the textmate
mailing list