AppleScript tell application "Finder" can't use special characters I found this question about the possibility to exchange windows paths with mac users and vice versa.
How to translate between Windows and Mac -style file locations?
It's working great for me, but for some reason the finder won't open paths with special characters in it. For example ä, ö, ü (which are common in germany).
I thought they are converted or something. So I removed the tell application part and replaced it with return mylocation to see whats happening. The returned path is the correct one and also special characters are in it.
Why does the finder not open it? Is there any workaround for this?
I paste the code here, so we talk about the same thing without confusion:
on searchReplace(theText, SearchString, ReplaceString)
    set OldDelims to AppleScript's text item delimiters
    set AppleScript's text item delimiters to SearchString
    set newText to text items of theText
    set AppleScript's text item delimiters to ReplaceString
    set newText to newText as text
    set AppleScript's text item delimiters to OldDelims
    return newText
end searchReplace

on run {input, parameters}
    
    set myClip to the input
    set mylocation to searchReplace(myClip, &quot;&lt;&quot;, &quot;&quot;)
    set mylocation to searchReplace(mylocation, &quot;&gt;.&quot;, &quot;&quot;)
    set mylocation to searchReplace(mylocation, &quot;&gt;&quot;, &quot;&quot;)
    set mylocation to searchReplace(mylocation, &quot;\\&quot;, &quot;/&quot;)
    set mylocation to &quot;smb:&quot; &amp; mylocation
    set mylocation to searchReplace(mylocation, &quot; &quot;, &quot;%20&quot;)
    
    
    tell application &quot;Finder&quot;
        open location mylocation
    end tell
    
    # after setting the location, set Finder to topmost, or delete this section if you dont want that.
    tell application &quot;Finder&quot;
        activate
    end tell
    
    
    return input
end run
I fixed it by decoding the umlauts like this:
considering case
    set mylocation to searchReplace(mylocation, &quot;Ä&quot;, &quot;%C3%84&quot;)
    set mylocation to searchReplace(mylocation, &quot;ä&quot;, &quot;%C3%A4&quot;)
    set mylocation to searchReplace(mylocation, &quot;Ö&quot;, &quot;%C3%96&quot;)
    set mylocation to searchReplace(mylocation, &quot;ö&quot;, &quot;%C3%B6&quot;)
    set mylocation to searchReplace(mylocation, &quot;Ü&quot;, &quot;%C3%9C&quot;)
    set mylocation to searchReplace(mylocation, &quot;ü&quot;, &quot;%C3%BC&quot;)
    set mylocation to searchReplace(mylocation, &quot;ß&quot;, &quot;%C3%9F&quot;)
    set mylocation to searchReplace(mylocation, &quot;ẞ&quot;, &quot;%E1%BA%9E&quot;)
end considering