Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

osxutils and accented chars



Hello

Some times ago I read a post saying that the osxutils package contains geticon and seticon command.

I downloaded the beast and start playing with it.
Alas, I quickly discovered that the commands fail when one of the used pathnames contains accented chars.

As I know which foldername is the wrongdoer, I wrote a trick renaming temporarily the "culprit".

--[SCRIPT colle_icone_v3]
(* utilise osxutils *)

on run
open ((choose file) as list)


end run

on open (sel)
set tname to "osxutils_slituxso"
tell application "Finder"
set f to (sel's item 1) as alias
set d to (container of f) as alias


set dd to (container of d) as alias
set {nof, nod} to {name of f, name of d}
set name of d to tname (* renomme provisoirement *)
end tell -- to Finder 
set dut to (dd as Unicode text) & tname & ":"
set fut to dut & nof


do shell script "/usr/local/bin/seticon " & quoted form of POSIX path of fut & " " & quoted form of POSIX path of dut


tell application "Finder"
set name of (dut as alias) to nod (* remet le vrai nom *)
update d
end tell


end open
--[/SCRIPT]


It works but I wish to know if the anomaly is due to osxutils itself or to the Apple's API used to write it.
As everybody may grab the sources from:
<http://osxutils.sourceforge.net/>
I hope that someone will be able to look at them.

After all, I met the same problem when I was scripting "Image Events" and it is now gone (since 10.4.8).

Yvan KOENIG
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.