Using Unicode in a variable char

Asked

Viewed 152 times

0

Guys like me to use unicode in C? I just don’t know how to store the 2 bytes of one unicode on a char, that’s all, someone knows how?

  • 2 bytes is not enough for all Unicode elements!

  • I need a housing for Latin and Japanese characters, so would that be 3 bytes? hm

1 answer

3

wchar_t seu_caractere = L'\u1234'


There are other types of data for custom characters, such as char32_t. But in your case, it’s easy to deal with the problem using the wide char.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.