Here comes my solution:
I wrote two BASH scripts 'plutf8' and 'defaultsread'.
####### plutf8 MyPlist
will convert a XML property list in 'old-styled' plist encoded in utf8. (Hint: MyPlist without .plist extension!!)
example: C=$( plutf8 "$TM_BUNDLE_SUPPORT"/bin/HSDOut )
You also can pipe data to plutf8: example: DIA=$( cat "$TM_BUNDLE_SUPPORT"/bin/HSDOut.plist | tm_dialog -m hypersearch | plutf8 )
######## defaultsread <domain> <key>
reads the <key> from <domain> and converts it to utf8. (Hint: <domain> without .plist extension!!)
example: B=$( defaultsread "$TM_BUNDLE_SUPPORT"/bin/HSDOut searchString )
############
Both scripts also converts UTF-16 surrogates. So you can use it for Unicode characters which are specified above 0xFFFF. (Because I'm dealing with such characters a lot ;) )
So, if you are expecting such characters you can use these scripts instead of 'pl' and 'defaults read' and you will get what did you enter.
I put these scripts into $TM_SUPPORT_PATH/bin so there is no need to write the path.
Maybe these scripts are worth to put into the TM release (?)
Comments??
All the best,
Hans