I'm having an increasingly frustrating problem in that I'm seemingly unable to print a unicode character (in this case, some braille dots), take it to a newline, and enter more braille dots. I've been looking for answers for a few hours now, and I'm about at my wit's end.
I've tried changing the format for my Unicode characters, changing localities, changing the order, using multiple fstreams, one wide and one normal, and using countless different supposed unicode newline escape sequences. This is repeated as many times as there are characters in a row. At the end of each row, it'll need to have an endline at the end.
wout.open((inputstring + "2.txt"), wofstream::binary | wofstream::trunc); //this only happens once
_setmode(_fileno(stdout), _O_U16TEXT);
switch (i) //will be expanded for more cases
{
case (63):
cout << "\xFF\xFE"; // UTF-16 BOM
cout << "\x0A\x28";
}
_setmode(_fileno(stdout), _O_TEXT);
I'm using setmode to switch to and from U16 because other parts of the program use text mode. If this is a problem, I can work around it. When I tried to use
wout << "\n";
at the end of each row, it changes the output to be half braille characters like I'd expect, half gibberish like "*૾H૾H૾H૾H૾H૾H૾H૾H૾H". When I remove any part to do with printing the braille characters, it prints newlines just fine. I'm at a loss.