Vladimir
You need to choose what encoding you will use, and use it.
Oleksandr
didn't get that
wchar_t -> char for unicode symbol
kλletaa
people writing code on windows must be sad
Vladimir
wchar_t -> char for unicode symbol
wchar_t not intended to place unicode in it, however noone can forbid it
Vladimir
From wiki: Type used for a code unit in wide strings, usually an unsigned 16 bit or 32 bit value. No specific interpretation is specified for these code units; the C standard only requires that wchar_t be wide enough to hold the widest character set among the supported system locales.[5] Theoretically, wchar_t can be the same size as char, and thus not capable of holding UTF-32 or UTF-16 code units.[6]
Anonymous
people writing code on windows must be sad
😐😶 mostly i use online ide sometimes on windows
Anonymous
Anonymous
even sadder
🤥🤥
Vladimir
https://kishuagarwal.github.io/unicode.html
Vladimir
Please read this article to understand what unicode is
Vladimir
And why you can't simply put non-ascii char and get it just magically works
klimi
windows, shrug
Vladimir
IdeOne just do all UTF-8 stuff for you
Vladimir
but works with UTF-8
Somewhere there's a code which parses utf-8 bytes
Vladimir
You should write it in C if you want it work
Anonymous
C/CPP/Java
Vladimir
any preferred Language
No, some language has built-in support fou unicode
Vladimir
Python iirc
klimi
Python iirc
oh i thought its the same
klimi
cant test tho i dont have windows
Vladimir
Pretty sure CPP and C has libraries for it
Vladimir
Don't know what's in Java
klimi
but it depends on the terminal you use for output
Vladimir
Yea, ofc. No point in printing utf-8 if your device doesn't support it or if you're lacking fonts
Vladimir
It's language, not compiler problem
Vladimir
However if you want compiler to parse utf-8 sources, it is
Anonymous
However if you want compiler to parse utf-8 sources, it is
what's shortest way to print ASCII value by it's decimal value
Vladimir
You can find your symbol from your supported encodings and set it by setlocale
Vladimir
Seems like u with dots is in default latin-1
Anonymous
What happened if you just print 252?
it'll print "252" cause of ASCII encoding of 128 bit? unlike UTF-8
Jesvi
i tried the above method to get arrow key inputs but it didnt turn out to work ,
Anonymous
that's some diff sym or ideone didnt support?
Vladimir
Try it in your IDE, not ideone
Jesvi
i tried the above method to get arrow key inputs but it didnt turn out to work ,
is there any other method of getting acii input and thereby make use of arrow keys in c++ ?
Anonymous
Try it in your IDE, not ideone
same as earlier when i pasted ü this to print directly
Vladimir
On windows it's common to use <conio.h> and getch() func
Vladimir
However iirc it's obsolete
Vladimir
Vladimir
Run cmd, execute chcp
Vladimir
Show output
Jesvi
i use "_getch()" instead of "getch()" coz code blocks doesnt support it (the above error is thrown) ... but still it doesnt work if i use _getch() ..
Ludovic 'Archivist'
same as earlier when i pasted ü this to print directly
First of all, ü is 2 chars as it is the dots followed by a u
Vladimir
> conio
Advice better
Vladimir
https://en.wikipedia.org/wiki/Code_page_437
Dima
Ludovic 'Archivist'
Jesvi
> conio
Added that headerfile qnd still throws error
Vladimir
noo man
just output char c = 129
Ludovic 'Archivist'
This things lies to you. What it names ASCII is latin-extended charset
Anonymous
just output char c = 129
ohh great.. thanku
Vladimir
ohh great.. thanku
Refer to this https://en.wikipedia.org/wiki/Code_page_437
Vladimir
Keep in mind it's not cross-platform solution at all
Anonymous
Keep in mind it's not cross-platform solution at all
it's just compiler, system, environment.. it varies with everything
Vladimir
Yeah, such a mess. That's the reason smart people invented unicode and tryies to implement it everywhere
MᏫᎻᎯᎷᎷᎬᎠ
and if i have to print a string? like some from latin characters and some from eng
std::wcout << L"hëllo, wôrld";
Vladimir
About arrow-keys - I am not good with arrow keys on windows, but afaik _getch() need to be called 2 times
Vladimir
First time you got escape char
Vladimir
(code 27)
Ludovic 'Archivist'
MᏫᎻᎯᎷᎷᎬᎠ
L whats that?
It specifies that the string-litrals are encoded as wchar_t