Terminal and non-ASCII Unicode

Problem: Use ‘do script cd’ in Terminal to change to a folder containing non-ASCII characters.

Assume I have a folder called “Księga Chmur”, and assume I choose it when prompted. (The character is block e with ogonek, <0x0119>.) This illustrates the issue:


set a to choose folder
do shell script "cd" & space & quoted form of POSIX path of a & "; pwd"
tell application "Terminal"
	do script "cd " & quoted form of POSIX path of a
end tell

Do shell script works (so it’s not a ‘POSIX path of’ problem); do script in Terminal doesn’t. Do shell uses sh; Terminal uses tcsh, but the window settings are according to http://docs.info.apple.com/article.html?artnum=152409. I can drag-and-drop in Terminal, and it works; I can copy-and-paste, and it works; but using the clipboard in AppleScript doesn’t.

Is there something I’m missing, or is it yet another of those issues which have been fixed in Tiger?

Thanks.

AppleScript: 1.9.3
Browser: Safari 312.3
Operating System: Mac OS X (10.3.9)

Seems to work ok for me in Jaguar. I created a folder called “T(e accent)st f(slash o)lder” and tried your script and it behaved properly.

Double check your Terminal settings (as your link instructs) and then quit Terminal and restart it.

See if that helps.

Model: iMac DV+
AppleScript: 1.9.1
Browser: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060214 Camino/1.0
Operating System: Mac OS X (10.2.x)

What shell are you using? Someone told it me it’s an issue with tcsh (not utf-8 clean). It does seem to work in bash…

thanks

tcsh is still the default shell in Jaguar, so that is what I’m using. Bash became default (I think) in Panther. Though you can set your default to a different shell if you want to.