eric.dizon
23rd April 2014, 00:02
I've created a T-SQL function/stored procedure on how to retrieve a value of a text in the tttxt010 table. The issue I have right now is there a way to retrieve a text value that is in Chinese character using t-sql only?

My function works fine when fetching English text, I get this value in SSL Management Server Studio when I use for Chinese encoded text

This is what I get from the query below... How make it show properly in Chinese ?
›½©ê›¾£Ì›½Ì¯›½¢›½¤›¾žæ›½õÙ›½®¨›½À›½œÈ›½žÍ›½þþŸ

SELECT @txt_content = ISNULL(cast(c.t_text as varchar(500)),'')
FROM [erplndb].[dbo].[ttttxt010600] c
WHERE c.t_ctxt = @txt_id and c.t_clan = @txt_lang and c.t_seqe = 1;

bhushanchanda
23rd April 2014, 11:28
Hi,

It will be better to post these kind of queries in Microsoft Forum's. You will get a quick and precise answer over there.

I found a relevant post. You can check it:-

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5d2ea1a2-32e1-4a82-b6e3-17d2b898babc/chinese-characters-issue-with-tsql?forum=transactsql

May be you will need to change some settings from your Control Panel to support other languages.

Also, there are a lot of related threads discussing the same. Google it!

eric.dizon
23rd April 2014, 22:35
Hi bhushanchanda,

It makes sense to post this in a MS site at first glance, but the question I am trying to ask really when I look at the [tttxt010] with binary value of listed below. Is Baan doing something different on what is saved on the database level? I have read about TSS Encoding and UTF-8 but if I am using Baan tools and simply would to convert what Baan saved as a Chinese text value. Is there a way to decode what is saved in the database level back to Chinese text?

0x9BBDA9EA9BBEA3CC9BBDCCAF9BBDA2EC9BBD9DA49BBE9EE69BBDF5D99BBDAEA89BBD9DC09BBD9CC89BBD9ECD9BBDFEEE9BBFFE9F0A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020