|
|
#1 |
|
Prospect
Join Date: Feb 2006
Posts: 20
|
Change Text File Encoding
Hi
How can I change the text file encoding to UTF-8 in lion on the command line? In snow leo it was as follows: defaults write com.apple.textedit PlainTextEncoding -int 4 This does not work in lion anymore. Any hint is welcome. Thanks Lazy |
|
|
|
|
|
#2 |
|
Hall of Famer
Join Date: Jan 2002
Posts: 2,930
|
It works for me exactly as you described. I had no default set. I ran your defaults command, and verified that it worked. Why do you think it's not working?
|
|
|
|
|
|
#3 |
|
Prospect
Join Date: Feb 2006
Posts: 20
|
You are right. It works in the plist. I was mislead because in the TextEdit prefs it shows something different: plist value 30 = We-Mac, TextEdit Prefs UTF-8.
Still a problem in Lion - I think. |
|
|
|
|
|
#4 |
|
Hall of Famer
Join Date: Jan 2002
Posts: 2,930
|
I too noticed that plist changes were not reflected in the GUI preferences.
|
|
|
|
|
|
#5 | |||||||||||||||||||||||
|
League Commissioner
Join Date: Aug 2006
Posts: 5,039
|
If you're serious about editing text, then I would use TextWrangler as my default text app. Or other dedicated app in preference to TextEdit. TW is free and I consider it an almost essential app for OS X. I have seen some webpages using this command: defaults write com.apple.textedit PlainTextEncodingForWrite -int 4 as well as the one you use. Last edited by benwiggy; 05-04-2012 at 01:23 PM. |
|||||||||||||||||||||||
|
|
|
|
|
#6 |
|
Prospect
Join Date: Feb 2012
Posts: 2
|
On snow leopard you can also do conversion with standard unix tool iconv...I'm not sure about Lion though. For the usage see the man page.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|