Accented Characters in Finder Names
Accented Characters in Finder Names
- Subject: Accented Characters in Finder Names
- From: Mr Tea <email@hidden>
- Date: Fri, 19 Dec 2003 11:38:28 +0000
Can anyone help me understand what's going on here?
set itm to alias "Studio!:Studio Files:Test Zone:Store:Chbteau 2.jpg"
set N to name of (info for itm)
set tl to every text item of N
--> {"C", "h", "a", "", "t", "e", "a", "u", " ", "2", ".", "j", "p", "g"}
Why is the 'b' ('a' + circumflex) split into two separate characters?
I stumbled into this anomaly while experimenting with the 'Change Case in
Item Names' script supplied with OS X (located in /Library/Scripts). The
script died when it encountered the b, so I opened it up to find out why.
The upper and lower case alphabet strings used in the script do not contain
any accented letters, so I added them and ran the script again. Still no
joy. Stepping through the script, I arrived at the error message 'Can't make
"^" into a string' (duh! you just did!).
The trick to get round this issue, apparently, is to convert the value of n
into a string before separating it into text items (or characters). That
reunites the 'a' with its circumflex and works as expected.
My guess is that it's something to do with the differences between Unicode
text and plain old strings, but that's a bit like saying that I reckon the
noise coming from under my bonnet/hood is something to do with the
alternator. I might be right, but I still don't really know what the hell
I'm talking about.
(It don't take a rocket scientist, however, to see that this 'problem with
accents' could make working with Finder item names unnecessarily complex for
many users in mainland Europe.)
And why can't applescript convert ASCII character 246 into a string in this
particular context?
Confusedly,
Nick
pp Mr Tea
(Wishing that he hadn't wasted everyone's time yesterday by posting that
sad, deluded 'OS X 10.3.2 just out!' message when it was already old news.
Regression is setting in.)
_______________________________________________
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.