duthomhas::utf8_console

Pages: 12
Remember that ridiculous program that was basically a desktop in 3D, with icons being boxes scattered around a volume at random?
https://www.youtube.com/watch?v=M0ODskdEPnQ
That 3D desktop looks kinda cool for a few minutes. I'd bet it gets annoying after using it for a while.

The Windows kernel eats up enough memory and HD space as it is, adding 3D layering would be a real gut buster. IMO.
Last edited on
Hi, Duthomas.
Thank you for sharing your program.

I’ve compiled it this way:
BUILD.bat mingw -m64

And I got:
MinGW-w64
utf8_console.cpp
example.cpp
example.cpp
Success


Examples work pretty fine:
>example.mingw.no-argv.exe
¿Qué tal?

s? àáâãäçèéêëìíîïòóôõöšùúûüýÿžÀÁÂÃÄÇÈÉÊËÌÍÎÏÒÓÔÕÖŠÚÛÜÙÝŸŽ
size = 108 : àáâãäçèéêëìíîïòóôõöšùúûüýÿžÀÁÂÃÄÇÈÉÊËÌÍÎÏÒÓÔÕÖŠÚÛÜÙÝŸŽ
[long list of numbers omitted]


After I tried this code (test.cpp):
1
2
3
4
5
6
7
8
9
#include <iostream>
#include <string>


int main()
{
    std::string s { "àáâãäçèéêëìíîïòóôõöšùúûüýÿžÀÁÂÃÄÇÈÉÊËÌÍÎÏÒÓÔÕÖŠÚÛÜÙÝŸŽ" };
    std::cout << s << '\n';
}


It compiled fine this way:
g++ -std=c++2a -O3 -Wall -Wextra -Wpedantic test.cpp utf8_console.o -o test.exe -municode -mconsole


But when I execute it (test.exe), my output is
���������������������������������������������֊����ݟ�


What am I doing wrong?
Uh, sorry, I found it: my source file (test.cpp) was encoded in ANSI.
Now it seems it works like a charm!

From a W7 user, many, many, many thanks for this gem!
Topic archived. No new replies allowed.
Pages: 12