On 8/21/09 7:58 AM, in article 4A8EB617.3030900@macfreek.nl, "Freek Dijkstra" public@macfreek.nl wrote:
Steps to reproduce
- Open new text file.
- 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.