c++ - Using unicode character in character literal -


as know '═' give multi-char constant warning. alternative either use 0x2550 or "\u2550". however, latter requires printing function support \u escape sequence. don't want use hexadecimal everywhere. there language construct can use allow me write '=' when mean uint32_t c = 0x2550, i.e., '='u.

know '═' give multi-char constant warning.

no.

alternative either use 0x2550 or "\u2550".

no.

however, latter requires printing function support \u escape sequence.

no.

don't want use hexadecimal everywhere. there language construct can use allow me write '═' when mean uint32_t c = 0x2550, i.e., '═'u.

yes.

uint32_t c = l'═'; 

with source encoding supports character.

for characters not in basic multilingual plane of unicode gets more involved though, because wchar_t in windows 16 bits, in original unicode.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -