How to decode a NCR to unicode character in C++

340 Views Asked by At

I want to decode a NCR value something like &# 35686; to its equivalent chinese character. Example:test direct(&# 35686;&# 23519;) should be converted to test direct(警察) . I have tried the below algorithm similar to java

  1. find the decimal value that is between &# and ; --ie. 35686
  2. Convert to int
  3. get the equivalent char by using char(35686) which will give the unicode char

In java , it produces expected output but in C++ it produces the string as test direct( fß) instead of chinese. Please help me out of this.

0

There are 0 best solutions below