Skip to main content

Hi, I would like to send a message through the tsf_send_message stored procedure with a parameter that contains non-latin characters, such as Cyrillic and Thai. However, currently, these characters are all converted to question marks.

i.e. <TEXT>"ภาษาไทย Phasa thai"</TEXT> becomes <TEXT>"??????? Phasa thai"</TEXT>. 

Is there any way to allow using non-latin characters in parameters?

Thanks in advance!

Dries Fransen

Hi Dries,

That currently does not work as the tsf_send_message function uses the varchar data type. A small experiment shows that it is supported by the Win GUI when the function would use the nvarchar data type:

Nvarchar msg parmtr

Could you create an Idea for this? That way we can plan it and maybe even make it possible from the 2021.3 version of the platform. Thank you!

(Link: Change the tsf_send_message parameter datatype to nvarchar | Thinkwise Community (thinkwisesoftware.com))


Hi Mark, thanks for the reply, I will create an idea!


@Mark Jongeling @Dries Fransen How about using XML, similar as suggested here? 

We had to use this to make special characters like the & sign work when retrieved from parameters and used in the custom message.


@Arie V Thanks for the reply. We are currently using XML, as such: 

The result of which should be ภาษาไทย Phasa thai, but is this (notice the ‘&’ sign does get passed to the stored procedure):

As Mark stated, the problem is not that special characters such as the & sign are not allowed, but rather that tsf_send_message uses the varchar datatype, which does not support unicode characters such as those from the Thai and Cyrillic character sets.


@Dries Fransen , Arie is referring to XML special characters which have to be replaced to be shown correctly. For example: & → &amp;

For reference: escaping - What characters do I need to escape in XML documents? - Stack Overflow

Changing the data type to nvarchar will not change this, it is a property of using XML. The tsf_send_message Message in SSMS will not show any problems as it is returning the created string, but in the GUI it will show an undesired result, example here: tsf_send_message: Special characters in messages | Thinkwise Community (thinkwisesoftware.com) 


Reply