0

My application was build based on MBCS but I have one currency symbol present in unicode but not in the relevant code page. I need to display the same currency symbol in my application, so is there any way i can implement it.

I'm trying to do this by using the Windows conversion API i.e. MultiByteToWideChar, WideCharToMultiByte, Will it help?

Please let me know if the above approach is right? or anybody tried? or any other way i can achieve this?

If possible can I get sample code snippet as example.

McDowell
  • 107,573
  • 31
  • 204
  • 267
  • 2
    This is of course not possible. You solve it by ripping out all code that requires this conversion, it need to be retired. – Hans Passant Feb 26 '13 at 12:43

2 Answers2

2

You can make one-off calls to Unicode APIs. For example

SetDlgItemTextW(hdlg, IDC_BALANCE, L"\x20AC 250");
Raymond Chen
  • 44,448
  • 11
  • 96
  • 135
0

MultiByteToWideChar() and WideCharToMultiByte() are the correct methods, but if the codepage you're using doesn't have a representation for the character you want to use, then it can not represent it. Your only choice is to switch the codepage used, or swicth to unicode. Both of these need agreement with whatever is using the data.

Deanna
  • 23,876
  • 7
  • 71
  • 156