Benches macOS

5

Non-ASCII Characters in QuickLook

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Using QuickLook on plain UTF-8 text files (AKA .txt files) displays garbled interpretations of various extended characters, including fancy quotes and other nice formatting characters... not to mention the entire Russian alphabet. Surprising given OS X’s general UTF-8/Unicode friendliness.

Anyone know of a hack / fix ?

I'm willing to go outside the box a bit if necessary, considering most of the text files I work with are multilingual.

thanks -K

5 replies

Sign in or join Beachball Help to reply.

  1. 0

    Tom Gewecke

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I can't seem to duplicate your problem. Here is a shot of my test using TextEdit. The missing one is Thai, probably because I changed the system font for that. Are you sure you used UTF-8? A .txt extension does not guarantee that -- you need to set the encoding in the prefs or the save dialogue. UTF-16 should also work. If you are using a different app, what is it?

    User uploaded file

  2. 0

    KEMitchell

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I am using TextMate to save in UTF-8. I tried 16 (little-e and big-e) with no improved results.

    Thanks!

  3. 0

    Tom Gewecke

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I am using TextMate to save in UTF-8.

    I downloaded TextMate and gave it a try. No problem for QuickLook to display non-ascii on my machine. If you would like to send me an copy of a file that does not work for you (probably best to zip it first), I'll have a look, just to make sure it's nothing about the file itself (tom at bluesky dot org).

  4. 0

    Vincent Noel

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I have the same problem, and it appears to be related to the use of extended attributes, see this thread on the vim_mac mailing list:

    http://www.nabble.com/MacVim-file-encoding-and-Quicklook-td17289501.html

    Using the 'xattr' command, as explained in the thread, fixes the Quicklook display (for me). But it's still not clear 1) why you have to do this to make quicklook recognize the encoding and 2) why isn't there more people affected?

  5. 0

    Oskar Hermansson

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I am also experiencing this problem. Just like Vincent writes, it seems to be related to extended attributes.

    An easier solution that scrolling through the thread linked above, is to read Vincent's own blog post about this, which is very straight forward:

    http://vnoel.wordpress.com/2008/06/18/weird-utf-8-bug-in-quicklook-its-the-ea/