Below is a part of the script, which works with normal chars as expected.
on run {theCal, theInput}
set the inputText to theInput as text
set the calender to theCal as text
set newEventResult to addNewEvents(calender, inputText)
do shell script "echo " & quoted form of newEventResult without altering line endings
end run
With Umlauts I have problems. A few years ago, the people who wrote the scripts at that time have made it with a trick. They have generated the script in the calling app with the parameters inside, compile it and then run it with osascript.
Now I changed to have precompiled scripts with parameters. Now for input UMLAUTS are broken.
The calling app is using MacRoman.
As of Mac OS X 10.4 (AppleScript 1.10), the AppleScript compiler is still not Unicode aware; scripts are compiled using the operating system’s primary encoding (typically Mac OS Roman for English users). This will cause some Unicode characters to be dropped, managled or otherwise displayed incorrectly. Unicode text that cannot be compiled directly can be represented by using code points:
set cherokeeNA to «data utxt13BE» as Unicode text
display dialog "CHEROKEE LETTER NA: " & cherokeeNA
set cardSuits to «data utxt2661266326622660» as Unicode text
display dialog "Card suits: " & cardSuits
(Note that the text may not display correctly in Script Editor’s result pane.)
There are many ways of determining the code point for a particular character – such as Mac OS X’s character pallete or various online – but it would probably be easiest to get this information with another script.