Re: New File Encoding and User Name (was Re: new nonempty files have wrong encoding)
Re: New File Encoding and User Name (was Re: new nonempty files have wrong encoding)
- Subject: Re: New File Encoding and User Name (was Re: new nonempty files have wrong encoding)
- From: David Ewing <email@hidden>
- Date: Mon, 15 Mar 2004 11:43:46 -0700
On Mar 12, 2004, at 8:53 PM, John Karp wrote:
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?
Unfortunately, yes.
BTW, is there a way to ask XCode use something else as the creator and
company name in new files?
You can change the company name by doing this in Terminal:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{
ORGANIZATIONNAME = "You Company Here"; }'
I think the user name will always use you actual user name.
However, you can create your own new file templates to make the files
contain whatever you want. Put them in '~/Library/Application
Support/Apple/Developer Tools/File Templates/". You can look in
'/Library/Application Support/Apple/Developer Tools/File Templates/' to
see what the current ones look like.
Dave
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.