-
1. Re: [AS] Problem with non English characters in file path
Muppet Mark-QAl63s Apr 14, 2010 12:33 PM (in response to Kasyan Servetsky)Kasyan, as of Leopard AppleScript treats all text as Unicode pre this you can specify 'as Unicode text'. Try a test with these.
-- Leopard
set x to POSIX path of (path to desktop)
-- Pre Leopard
set x to POSIX path of (path to desktop as Unicode text)
-- Leopard
set x to POSIX path of (choose file without invisibles)
-- Pre Leopard
set x to POSIX path of ((choose file without invisibles) as Unicode text)
-
2. Re: [AS] Problem with non English characters in file path
Kasyan Servetsky Apr 15, 2010 5:57 AM (in response to Muppet Mark-QAl63s)Thank you Muppet Mark, but this didn't help.
When run this line
set x to POSIX path of ((choose file without invisibles) as Unicode text)
and select a file in "BackUp Têtard" folder, I get an error:
The ê character changes to circumflex (see the screenshot above) while the script compiles in both Script Editor and Script Debugger.
Kasyan
-
3. Re: [AS] Problem with non English characters in file path
Kasyan Servetsky Apr 15, 2010 8:46 AM (in response to Kasyan Servetsky)I've solved this — just tested it on Mac OS X 10.5.6 — Script Editor 2.2.1 — and it works!
-
4. Re: [AS] Problem with non English characters in file path
Muppet Mark-QAl63s Apr 15, 2010 8:55 AM (in response to Kasyan Servetsky)Kasyan, sorry about that I don't know what to suggest. Im at a Tiger workstation at the moment and I have NO issues with a file "Têtard_File.tif" in folder "BackUp Têtard" on my desktop.
set x to POSIX path of ((choose file without invisibles) as Unicode text)
set y to POSIX file x as alias
gives in event log:
tell current application
choose file without invisibles
alias "Marks G5:Users:marklarsen:Desktop:BackUp Têtard:Têtard_File.tif"
end tell
with result:
alias "Marks G5:Users:marklarsen:Desktop:BackUp Têtard:Têtard_File.tif"
My keyboard settings are to "British" though…