Re: Somewhat OT - Creating a Project Template from Working Project With Shell Script
Re: Somewhat OT - Creating a Project Template from Working Project With Shell Script
- Subject: Re: Somewhat OT - Creating a Project Template from Working Project With Shell Script
- From: Tommy Nordgren <email@hidden>
- Date: Thu, 15 Jun 2006 20:46:21 +0200
On 15 jun 2006, at 19.39, Rush Manbert wrote:
Tommy Nordgren wrote:
Found the answer. Perl is the way to go. The pack() function is
your friend for inserting those pesky UTF-8 codes.
- Rush
_______________________________________________
You don't have to use pack for that. Just put the line
use utf8;
early in your perl script, and write the entire script using the
utf8 encoding
That's what I thought would work, but I tried it (being very
careful that the replacement string had the correct encoding) and
it didn't work. (Perl complained about bad UTF-8 characters). I
also worried that, even if I did get it working, someone could come
along and edit the script with an editor that wasn't set to support
the encoding, and things would get messed up. The pack function was
my second attempt, and it avoids the second problem.
My real question is "Why didn't they just use some ASCII character
sequence, instead of the funky characters?", but I digress. :-)
- Rush
Check that your editor saves your script as utf8 Text Wrangler, in
particular is good at handling many different encodings,
also you might have to set appropriate encodings on file handles for IO.
-------------------------------------
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
email@hidden
_______________________________________________
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