On 2009-09-28, at 06:45:54, Steffan A. Cline wrote:
Aside from the file chooser not allowing anything issue under Swedish localized OS, I came across another issue. My code seems to NOT be always drawing the correct original path in the save as dialog. If the app opens and saves the file with no user interaction, it works fine. This issue happened with another user under Swedish localization.
Anyone seen this or should I post it to the bug reporter?
A few years ago, on another scripting list, there were a lot of problems being reported by a guy with a Swedish setup. Had to do with canonically decomposed character sets. So one potential problem area could be that you are rolling your own for path splitting, etc. Here's an example which bypasses those areas. No guarantee that it will perform any better on a Swedish system but it could be a step towards locating the source of the problem…
on yui_compress(theFileAlias)
set finfo to info for theFileAlias
set pp to POSIX path of theFileAlias
set ext to name extension of finfo
if (ext is not in {"js", "css"}) then
display dialog "The extension \"" & ext & "\" is not supported by the YUI compressor." buttons {"OK"} default button "OK" with icon stop
return
end if
set prefix to (do shell script "tclsh <<< 'puts [file rootname {" & pp & "}]'")
set newname to prefix & ".min." & ext
set jar to (quoted form of POSIX path of (path to resource "yuicompressor-2.4.2.jar"))
set java to "java -jar " & jar & " " & (quoted form of pp) & " -o " & (quoted form of newname) & " --charset utf-8"
try
do shell script java
on error errs number errn
if (errn is not -128) then
display dialog "Problem with: " & pp & return & return & errs buttons {"OK"} default button "OK" with icon stop
end if
return
end try
end yui_compress
on open theFileList
repeat with f in theFileList
yui_compress(theFileList)
end repeat
end open
on run
set choice to choose file with prompt "Select a .js or .css file to be minimzed." of type {"js", "css"} with multiple selections allowed
open choice
end run