Text Encodings in Xcode
Text Encodings in Xcode
- Subject: Text Encodings in Xcode
- From: "AppleLists" <email@hidden>
- Date: Sat, 18 Sep 2004 23:46:33 +0400 (MSD)
Hi folks,
I'm sorry if this has already been discussed before, but I just can't make Xcode work with the text encoding I need. Recently I started working at a Russian internet company, and they're using so-called CP-1251 encoding, which is Microsoft standard for Cyrillic characters.
There are three main encodings used in Russia: Windows (CP-1251), KOI8-R (Unix/Linux standard) and plain old DOS (CP-866). Also, there are Mac OS and ISO 8859-5, which nobody seems to use.
All of these encodings are available in Safari, and you can switch them on in TextEdit, if you select "Customize Encodings List..." in the pop-up menu for encodings, located in Preferences. So it's not that Apple doesn't support them.
But for some strange reason, the only encodings that show up in Text Editing pane of Xcode Preferences, are, quite ironically, "Cyrillic (Mac OS)" and "Cyrillic (8859-5)" -- those that never get actually used in Russian part of internet.
I looked at the CFStringEncodingExt.h (CoreFoundation), and all five of them are there (plus some obscure CP-855)! So I decided the problem was with NSString, and I looked at NSString.h. Indeed, it gave a much shorter list of encodings, but to my big surprise the only cyrillic encoding listed was... CP-1251 -- the one I need!
Having said all this, I really can't explain why the developers of Xcode chose to support only 2 most rarely used cyrillic encodings, whereas all of the necessary constants/codepages exist in the OS. Their selection of available encodings seems pretty random to me.
My working solution is to fire up TextEdit when I need to view/edit code comments, but that's very inconvenient. I wish Xcode had the same "Customize Encodings List..." dialog that TextEdit has.
So the question is: can I somehow hack Xcode to add support for the encoding I need? Can I make some kind of plug-in to solve the problem until Apple does? Any suggestions would be very helpful.
Thank you.
Sergei Yakovlev
eHouse Internet Holding (www.ehouse.ru)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden