Visual C++ - how can I turn a unicode character into char or string?

62 Views Asked by At

To get a string of the Greek letter µ in my Visual C++, I can enter "µ" or use the ASCII CP-1252 code 181 by e.g. std::string(1, 181) (and as a sidenote, this displays correctly in the GUI as µ). The unicode sequence "\u03BC" just turns into a question mark (a proper ASCII question mark which equals std::string(1, 63), not something else which is shown as a question mark).

Why does Visual C++ converts the unicode for µ into something else when µ is in fact supported? Can I enter the unicode character U+03BC or \u03BC into my code in some other way to get µ, or do I have to stick to something like std::string(1, 181)?

0

There are 0 best solutions below