Hi all!
I don’t know if I’m reinventing the wheel, but I’ve found a way to pass the character “�” to the Script Editor (you know, the new protocol “applescript://…”). It works only from Safari, we may find a way to do it from other browsers.
You can see a sample here:
http://homepage.mac.com/julifos/assartik/articulos/04.html
(scroll to the last applescript sample and click the disk icon)
Basically, the script is hardcoded into a javascript variable:
var script3 = 'property nombre_del_usuario : ""'+CR+
'if nombre_del_usuario = "" then'+CR+
'set nombre_del_usuario to text returned of �'+CR+
'(display dialog "Por favor, teclee su nombre..." default answer "")'+CR+
'end if'+CR+
'display dialog "Bienvenido, " & nombre_del_usuario'
Where CR = ‘r’
And the script is passed as follow:
SaveScript(script3);
function SaveScript(the_script) {
window.location.href = "applescript://com.apple.scripteditor/?action=new&script=" + escape(the_script)
}
All this code was thought for other tasks, but I was playing and tried to make it work for the new “applescript://” protocol, so I added the “applescript://” stuff and voil�. :shock:
Also, by the way, if you test the previous script, you will see also that is passes OK the special characters (eg, “�”) ( :shock: again).
Why? Well, the only I know is that the page uses ISOLatin1 characters. Eg:
So, the word “Mam�n” is writen in the HTML page as “Mam�n”, and it does work.
This means that the mentioned continuation character “�” is not written as “�”, but as “�” (an umlaut), which is also the hex “AC”, thought when url-encoded as “%AC” is not recognized as “�”. Just download the html page and take a look yourself.
I don’t know how does it work this phpBBS, but perhaps with a little of investigation we could also use it here on our linx? (though I think we can’t force it to print umlauts and it will allways attempt to url-encode hi-ascii; however, still useful for other purposes…)