TrueColorConsole icon indicating copy to clipboard operation
TrueColorConsole copied to clipboard

Allow extended ascii chars

Open aiixu opened this issue 5 years ago • 7 comments

Hey, how could i render chars like █ using your lib ? It prints "?" instead of the right character even if i change the character mode

aiixu avatar May 27 '20 21:05 aiixu

See official docs in Readme, if not supported you can always draw a square like I did in plasma example else 🤷‍♂️

aybe avatar May 27 '20 22:05 aybe

Yeah but in Plasma.cs you use white spaces to achieve this. I fact, i need to use █ for more optimizing. Like, render consecutive bytes as " " then next consecutive bytes as "████" using background color for first group and foregroup for the second. I made some test and it's way faster to do it that way.

But i need to access the extended ASCII char table.

In "VTConsoleMisc/SetCharacterMode.cs" you call WriteConcat(ESC, "(B"); if the user chooses the ASCII char set. Maybe you could modify something here to be able to have more char sets. And to get the bytes for string builder, you use Encoding.ASCII.[...] maybe by modifying the char set and this line we could achieve what i'm trying to do.

aiixu avatar May 28 '20 07:05 aiixu

A quick web search shows that these extended chars depend on font and page code and windows' default does not have them. Check this first then improve your fork!

aybe avatar May 28 '20 08:05 aybe

In fact, windows can display them. I used to use (?) them in Batch few years ago. And it's possible to display them via a C# program too (already made it with another lib)

aiixu avatar May 28 '20 08:05 aiixu

█ is basically ALT+219

aiixu avatar May 28 '20 08:05 aiixu

I think it comes from your lib : capt

aiixu avatar May 28 '20 08:05 aiixu

Found a way to do it : working thing This works

aiixu avatar May 28 '20 08:05 aiixu