Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'd like to process a unicode text file using TextEdit. When I open the file using TextEdit or TextWrangler instead of seeing Nattvardsgästerna I see this Nattvardsg‰sterna (which is incorrect). When I open the file on my PC I see the correct String.

I'm certain, I'm missing a setting or something...

Thanks

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You can set the default opening encoding to UTF-8 or UTF-16 in TextEdit Preferences/Open and Save.

But your example seems to indicate a non-unicode text, where Latin-1 ä (E4) is being read as if it were in MacRoman encoding, where E4 is allocated to ‰.

Or perhaps it is Unicode UTF-16 being read as if it were MacRoman?

share|improve this answer
    
Hello Tom, I played with TextWrangler cycling through different encodings, when I open with Latin-1 the file looks fine. I'm really confused though...because I after playing around with it, I saved the file as UTF-8 (just to see what happens) and now I can open it in TextEdit and looks fine. So can I convert the file to UTF-8 without losing anything? –  hba Jan 19 '13 at 0:03
    
@hba Yes, you should not lose anything by converting things that way. It is probably best to save as "UTF-8 with BOM" to minimize the chance of it being opened with the wrong encoding. –  Tom Gewecke Jan 19 '13 at 0:12
    
Will do. Thanks! –  hba Jan 19 '13 at 1:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.