Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Support more encodings in TextEdit Apps
This tip expands on a note I read in the cocoa-dev mailing list.

As it ships, TextEdit can open files in nine encodings, including Unicode, UTF-8 and Shift-JIS. This is pretty handy, but there's more - it is fairly easy to change the list of supported encodings to include any of the over 100 built in to Cocoa.

Here is how you do it:
  1. In the Finder, control-click on the TextEdit application and select Show Package Contents. This opens a new window with a Contents folder.
  2. Open Contents/Resources
  3. Make a copy of the file MoreEncodings.plist; call the copy Encodings.plist
Now if you launch TextEdit, you will have 33 encodings to choose from. These encodings are specified in Encodings.plist.

To continue with this tip, you will need the developer tools. Assuming you have them, do this:
  1. Open Encodings.plist in PropertyListEditor or a text editor.
  2. Open the file /System -> Library -> Frameworks -> CoreFoundation.framework -> Versions -> A -> Headers -> CFStringEncodingExt.h in a text editor. This file lists all the encodings supported in Cocoa. By adding entries to Encodings.plist you will get support for the corresponding encoding in TextEdit.
  3. Note that you will have to convert the hexadecimal values in CFStringEncodingExt.h to decimal values to put in Encodings.plist. I use PCalc to do this.
[Editor's note: I have not tried this tip...]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[2,830 views]  

Support more encodings in TextEdit | 2 comments | Create New Account
Click here to return to the 'Support more encodings in TextEdit' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
OR..
Authored by: Chas on Feb 26, '02 08:59:41AM

Or you could just use "WorldText" which ships on the Developer CD. It's in the folder /Developer/Applications



[ Reply to This | # ]
right-to-left script support?
Authored by: Anonymous on Feb 26, '02 11:21:37PM

I notice that two of the encodings are Arabic and Hebrew. I don't know either of these languages, but I know people have been complaining about the lack of support for them in OS X. Does enabling these encodings solve the problem, or is there more to it? I guess you would need some special input device, as you do with Japanese. Would it be hard to write one with the Dev Tools?



[ Reply to This | # ]