Re: More fun with Unicode
Re: More fun with Unicode
- Subject: Re: More fun with Unicode
- From: bill <email@hidden>
- Date: Tue, 06 May 2003 17:31:48 +0800
On 06/05/2003 16:09, "John Delacour" <email@hidden> wrote:
John,
Thanks for your sharing :)
>
if I tell Perl to write a byte order mark followed by some UCS2
>
characters, it magically converts it to UTF-8
Wow, is it related to "Little Endian" or "Big Endian"?
>
so this script actually writes UTF8 to begin with.
Well, isn9t it UTF-16? Two reasons: Using Terminal.app (the character set
encoding is UTF-8) the command:
% more /tmp/temp
Would returns garbled characters
Then, using TextEdit.app (the default plain text encoding is also UTF-8) to
open the file 3/tmp/temp2, it appears as a blank document. Only using UTF-16
for encoding (press command O & choose UTF-16), we can see the circled 3WOW2
& 3!2. On the contrary, your last script to write the poem, it9s normal
using UTF-8 by TextEdit.app to open the 3tmp/temp2; quite confusing :(
>
Step through it and see what happens. Do it in Script Editor.app and
>
not in the carbon one or Smile because they can't display the
>
characters properly. Great fun!
IMO, using applescript to deal with unicode, it9s more headache than fun :(
bill
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.