Save Chinese to database to become '?'

Page

Save data to DB


MS SQL DB


List Page

This has to do with your charset: you should find out what charset you are using.

You can then use TextToBinary and BinaryToText to decode your charset.

For instance from UTF-8 to UTF-16 (probably what you need).

I am not sure what charset OS database uses, but i am sure if needed, it can be changed.

Stefano Valente wrote:

This has to do with your charset: you should find out what charset you are using.

You can then use TextToBinary and BinaryToText to decode your charset.

For instance from UTF-8 to UTF-16 (probably what you need).

I am not sure what charset OS database uses, but i am sure if needed, it can be changed.


Hi Stefano,


I am having the same problem in external database (MSSQL).

I checked the charset for both database (OutSystem MSSQL DB and External MSSQL DB).

They are using the same charset (SQL_Latin1_General_CP1_CI_AS).


However, we can save Chinese character in OutSystems DB but External DB cannot.

Is there any things we need to change on the DB settings? 


Also, could you please give some example on how to implement decoding "TextToBinary and BinaryToText"?


Thank you.


You'd better check which type of your column,. VARCHAR or NVARCHAR ?

If it is VARCHAR with SQL_Latin1_General_CP1_CI_AS with , DB CAN NOT save Chinese.

If it is NVARCHAR, DB can save Unicode include Chinese.


OutSystems use NVARCHAR type, so it can handle Chinese well.

So just use NVARCHAR instead of VARCHAR with your external DB too.


Best Regards

Wei