Convert Unicode text into a string

Hey guys, how do I convert Unicode text into a string for use with AppleScript, like I set a variable to some Unicode text but how do I convert it back into a string?

I tried looking in the Apple documentation but couldn’t find. Must be one function that didn’t work for me anyway.

I’ve mentioned it before: Coerce Unicode Text to Plain Text (or Boolean)

It’s also mentioned in the (discussion section of the) documentation for the default entry class.

well i tried the function that was in apples documentaion for the default entry but when ever i run it i get this error

Cant make <<data ****0523453154354554H35RE4H35TS4H354354>> into type Unicode text. (-1700)

obviously the bunch of random numbers isnt correct but everything else is exact as the error message, i also tried using yours

Hey guys i also get this in the build log when i execute the application, any ideas?

[Session started at 2006-05-20 13:52:29 +0930.]
2006-05-20 13:52:33.701 MultiAlarm[5483] “Error -1700: Can’t make end of every «class defE» into type «class insl».”

You’re trying to turn a default entry object («class defE») into some sort of location reference («class insl»). Would post the lines of code where you are using default entries?

umm so u want the code that reads the prefrence file? well since ive been trying every method thats given to me there isnt much that exists but ill give the code that i have.

set machTypeTemp to content of default entry "motionEngine" of user defaults

thats the line that fetched the unicode text, and this is the output of the defaults

starbuck:~ jamesas$ defaults read com.semaja2.MultiAlarm
alarmSensitivity = <040b7479 70656473 74726561 6d8103e8 84014084 8484084e 534e756d 62657200 8484074e 5356616c 75650084 84084e53 4f626a65 63740085 84012a84 84016497 0686>;
motionEngine = <040b7479 70656473 74726561 6d8103e8 84014084 8484084e 53537472 696e6701 8484084e 534f626a 65637400 8584012b 09706f77 6572626f 6f6b86>;