New File Encoding and User Name (was Re: new nonempty files have wrong encoding)
New File Encoding and User Name (was Re: new nonempty files have wrong encoding)
- Subject: New File Encoding and User Name (was Re: new nonempty files have wrong encoding)
- From: "John Karp" <email@hidden>
- Date: Sat, 13 Mar 2004 03:53:49 +0000
Hi, I think I just figure out the exact condition for the problem I reported
to occur.
I have used a two-byte character in my user name (not the "short" login
name). XCode apparently indicate the user name as the creator in a comment
in any new file created from template AND if that name has any 2 byte
character in it, it uses UTF-16 instead of UTF-8 or whatever I specify in
the preference to encode it, hencing causing me grief. I reached this
conclusion after creating another user with only latin character set used in
its name field and the file created is in 8-byte character.
Does this mean that until this behavior is corrected, I have to change my
name on OSX or manually change the file encoding everytime? BTW, is there a
way to ask XCode use something else as the creator and company name in new
files?
Thanks.
From: David Ewing <email@hidden>
To: John Karp <email@hidden>
CC: email@hidden
Subject: Re: new nonempty files have wrong encoding information
Date: Fri, 12 Mar 2004 10:57:22 -0700
On Mar 11, 2004, at 7:10 PM, John Karp wrote:
When I create a new cocoa bjective c file in a project, it is always in
UTF-16 encoding regardless which encoding I have choosen in Preference for
Text Editing. So I have to "Reinterpret" the skeleton file as UTF-16.
Since gcc only understands 8 bit code, I then have to convert it to UTF-8
or other encoding compatiable with 8-bit code. I haven't tried other
cases, but I am guessing that that this is due to the template files
themselves being in UTF-16 encoding and somehow my preference setting is
not being respected by the new file menu command. What is the fix for
this annonyance? Please point me to earlier post if it has been addressed
(I searced but did not find anything.)
This is a known issue. But I don't think the files start out as UTF-16.
They should start out with an 8-bit encoding. I don't recall which one, but
it should be compatible with gcc. Reinterpreting the encoding as UTF-8
should be safe. What is your default encoding set to in your preferences?
Dave
_________________________________________________________________
Fast. Reliable. Get MSN 9 Dial-up - 3 months for the price of 1!
(Limited-time Offer) http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.