unicode
-
Hi I have a array of WCHAR type and my data is in buffer in unicode format whenever i try to read byte from buffer it add some nonprintable character at last . And if i try to read byte in char array it just display only first character. what is the reason
manu
-
Hi I have a array of WCHAR type and my data is in buffer in unicode format whenever i try to read byte from buffer it add some nonprintable character at last . And if i try to read byte in char array it just display only first character. what is the reason
manu
-
WCHAR *m_pbytTemp=new WCHAR[From-To+1]; memset(m_pbytTemp,0x0,From-To); memcpy(m_pbytTemp,&m_pbytFileBuffer[To],From-To); m_pbytTemp[From-To]=L'\0';
manu
manu_2205 wrote:
memset(m_pbytTemp,0x0,From-To); memcpy(m_pbytTemp,&m_pbytFileBuffer[To],From-To);
memset(m_pbytTemp,0x0,From-To); Use
wmemset()
while working with Unicode! memcpy(m_pbytTemp,&m_pbytFileBuffer[To],From-To); Similarly usewmemcpy()
!
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
manu_2205 wrote:
memset(m_pbytTemp,0x0,From-To); memcpy(m_pbytTemp,&m_pbytFileBuffer[To],From-To);
memset(m_pbytTemp,0x0,From-To); Use
wmemset()
while working with Unicode! memcpy(m_pbytTemp,&m_pbytFileBuffer[To],From-To); Similarly usewmemcpy()
!
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
Then shouldn't you be using something like
W2A()
?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb