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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -