C++ Windows Unicode Console Output

unicode gone wrong

Update 2019-11-11

Not much has changed in the WINLAND console world. Still, the following code produces no output.

Unless you do spend time digging through this long post or other similar posts elsewhere. Generally doing things, Linux/Mac console developers users, have never heard of.

For example. I have never mentioned ‘u8’ (UTF-8) string literals. That is an iso C++ native way to use UTF-8 encoding of char string literals.

To actually make the above work, you need to do two more “things” as ever: make sure chcp 65001 is executed beforehand, on the same console (in WIN10 it *should* be the default), and of course if not already switch to the font that can show these glyphs.

Yes, to code in a truly portable fashion, I suggest using char8_t as bove.  Alternatively, one can always try a bit more relaxed style:

But be prepared to be surprised by your compiler, at least for a while until it exhibits a full C++20 conformance.

Windows Terminal 1.0

Yes, there is much more I can write about this whole issue, but I decided not to.  Yet. Let’s allow the WIN team leadership to release a stable and bug-free new console subsystem first. Apparently that is “spring 2020”.

Continue reading “C++ Windows Unicode Console Output”

c++ metacall()()()™

A paradigm shift (or revolutionary science) is, according to Thomas Kuhn, in his influential book The Structure of Scientific Revolutions (1962), a change in the basic assumptions, or paradigms, within the ruling theory of science. It is in contrast to his idea of normal science.

metacall series


metacall broadly means: “call of calls”

Part 3 : C++ Binding

It is not attached to any programing language, yet metacall as a concept is born (and bred) in the domain of type-less JavaScript.  Slight difficulty is that good old/new/standard C++, is v.s. JavaScript, one strongly typed language. In English: types are everything.

Also, C++ is  compiled language, vs dynamic (interpreted) JavaScript. Although, metaclass is already implemented in C#. And conceptualy, as far as types are concerned, C# is somewhere in between, (but not in the middle !) even in it’s latest reincarnation.

Ditto, I think metacall must be implemented in C++ too. Let’s jump into the deep.
Continue reading “c++ metacall()()()™”