unicode - Dealing with u"strings" in gdb -


why can't cast u"string" wchar_t* in gdb?

(gdb) print (wchar_t*)l"abc" $60 = 0x568ae3b0 l"abc" (gdb) print (wchar_t*)u"abc" $61 = 0x567c5078 l"\x620061c\020i\x56640948\x567c50d0\x567c4f80\x567c4f30" 

u"string" array of unsigned short same array of wchars.

wchar_t not same unsigned short on linux, it's same unsinged. on linux, wchar_t utf-32, not utf-16. you'll have use unicode library convert (probably icu) .

you can cast char32_t* though.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -