A
anubis
Heay, i've got this problem:
http://rafb.net/paste/results/lpNgbn49.html
i'm using wifstream to read utf-16 file and i've got this problem, that
each byte is read into seperate char while little-endian uses at least
2 bytes for one sign.
the code of method is in the above letter, also with the problem i'm
attaching below:
i've googled and browsed documentation, but can't make it out by my
own.
/*
+ std::_String_val<wchar_t,std::allocator<wchar_t> > {_Alval={...}
} std::_String_val<wchar_t,std::allocator<wchar_t> >
- _Bx {_Buf=0x0012f340 "쀰7H" _Ptr=0x0037c030 "þÿH"
[0] 49200 '쀰' wchar_t
[1] 55 '7' wchar_t
[2] 72 'H' wchar_t
[3] 0 wchar_t
[4] 101 'e' wchar_t
[5] 0 wchar_t
[6] 108 'l' wchar_t
[7] 0 wchar_t
- _Ptr 0x0037c030 "þÿH" wchar_t *
254 'þ' wchar_t
_Mysize 12 unsigned int
_Myres 15 unsigned int
*/
http://rafb.net/paste/results/lpNgbn49.html
i'm using wifstream to read utf-16 file and i've got this problem, that
each byte is read into seperate char while little-endian uses at least
2 bytes for one sign.
the code of method is in the above letter, also with the problem i'm
attaching below:
i've googled and browsed documentation, but can't make it out by my
own.
/*
+ std::_String_val<wchar_t,std::allocator<wchar_t> > {_Alval={...}
} std::_String_val<wchar_t,std::allocator<wchar_t> >
- _Bx {_Buf=0x0012f340 "쀰7H" _Ptr=0x0037c030 "þÿH"
- _Buf 0x0012f340 "쀰7H" wchar_t [8]} std::basic_string said:::_Bxty
[0] 49200 '쀰' wchar_t
[1] 55 '7' wchar_t
[2] 72 'H' wchar_t
[3] 0 wchar_t
[4] 101 'e' wchar_t
[5] 0 wchar_t
[6] 108 'l' wchar_t
[7] 0 wchar_t
- _Ptr 0x0037c030 "þÿH" wchar_t *
254 'þ' wchar_t
_Mysize 12 unsigned int
_Myres 15 unsigned int
*/