Some UNICODE characters (big endian) not getting properly on debug/exe run times but we can write those characters in editor (vs 2015 community editio

  • Thread starter Thread starter satheesh_in
  • Start date Start date
S

satheesh_in

Guest
Hi, (vs 2015 community edition, MFC)

I have some unicode character in a file. i use vs 2005 but it was not supporting all unicode characters. So that i started in visual studio 2015 community edition. its okay we can write all unicode characters manually in editor. (UNICODE big endian). (These chars i stored in an array wchar_t arr[500]/new alloc. Inside those array too some unicode chars elements update is impossible, but some unicode char possible too, described below)

𠀐亙𠀃𠀃亙亙𠀐𠀐Val𪛕𨕥

The same characters above, i stored in a file. I can write those manually in editor vs 2015. But on debugging time some of the characters giving a wrong result. (𠀐, 𠀃, 𪛕, 𨕥). so i can use these chars for verifying purpose (if .. else)

eg: if(chArr[for_count] == L'𠀐') // always getting wrong result

other chars no problem to work. (already set out _wsetlocale function also)

The same time i want to write/print those 'non getting' character in a file after verification. So i wish to know about any compiler updates/editor updates/ vs new version. so that i can move successfully.

Regards,

Satheesh

/********************************************************************/

wcstring is a wchar_t array contains 𠀐亙𠀃𠀃亙亙𠀐𠀐Val𪛕𨕥

System::Text::Encoding^ encodingWr = System::Text::Encoding::BigEndianUnicode;
StreamWriter^ writer = gcnew StreamWriter("Converted.txt", true, encodingWr );
//String^ line = reader->ReadLine();

for(int ct = 0; ct< ctTot; ct++)
{

int ln = wcstring[ct]; // correct number

wh = /*(wchar_t)*/ wcstring[ct]; //wrong

str.Format(_T("UNNUM %d %lc"), ln, wh);

/* How to: Convert Between Various String Types
// Convert a wide character CStringW to a
// System::String.
String ^systemstringw = gcnew String(str);
//systemstringw += " (System::String)";
//Console::WriteLine("{0}", systemstringw);
//delete systemstringw;

writer->WriteLine(systemstringw);
delete systemstringw;

OutputDebugString(str);

}

/********************************************************************/

This char getting properly 亙, V, a, l so that i can print same chars and get the value also.

These not getting 𠀐,𠀃,𠀃,𠀐,𠀐,𪛕,𨕥

It needed to get the value as well as all those char too, to print also. Also it needed to change some uncode char in array during the program run. so printing time it is not proper.

Continue reading...
 
Back
Top