More weird Unicode things
More weird Unicode things
- Subject: More weird Unicode things
- From: jj <email@hidden>
- Date: Fri, 03 Jun 2005 12:17:47 +0200
Hi again!
While your suggestions about POSIX-izing and de-POSIX-izing work fine (and
are a real pain when you try to handle a large project), I can't still find
a reliable way to handle this crap. Feel free to choose any file inside a
folder called like the one I posted yesterday for this test:
http://homepage.mac.com/julifos/archivos/unicodethings.dmg
##############################
pathnameandparent(choose file)
to pathnameandparent(f)
set AppleScript's text item delimiters to "/"
set f to (POSIX path of f)'s text items
set parentDir to items 1 thru -2 of f as Unicode text
set fileName to item -1 of f
set AppleScript's text item delimiters to {""}
return {fileName, parentDir}
end pathnameandparent
##############################
Seems that "f" holds a list of Unicode text(s) when it's splitted using TIDs
but, at join time (items x thru y as unicode text), the string cuts when it
finds the "offending" Unicode text. So, where I should read (XXXXX = Unicode
text):
/path/to/XXXX/dir/XXXX/foo/
It will throw:
/path/to/
I think this has been discussed before (specially about TIDs and Unicode are
not friends), but I can't find yet a simple way to get this task done
without going to the Finder or a shell script... In fact, I can't believe
this is real (!) I hope I'm missing something here...
jj
--
http://www.macscripter.net/
http://www.osaxen.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden