fatal error: 'io.h' file not found
#include <io.h>
error: use of undeclared identifier '_O_U16TEXT'
_setmode(fileno(stdout), _O_U16TEXT);
error: use of undeclared identifier '_O_U8TEXT'
_setmode(fileno(stdout), _O_U8TEXT);
error: use of undeclared identifier '_setmode'
_setmode(fileno(stdout), 0x00040000);
error: no member named '_setmode' in namespace 'std'
int oldMode = std::_setmode(std::_fileno(stdout), std::_O_U8TEXT);
error: no member named '_fileno' in namespace 'std'
int oldMode = _setmode(std::_fileno(stdout), _O_U8TEXT);
error: no member named '_setmode' in namespace 'std'
std::_setmode(fileno(stdout), 0x00040000);
|
|
|
N☺☻♥♦♣♠•◘○◙♂♀♪♫☼
►◄↕‼¶§▬↨↑↓→←∟↔▲▼
!"#$%&'()*+,-./
0123456789:;<=>?
@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_
`abcdefghijklmno
pqrstuvwxyz{|}~⌂
ÇüéâäàåçêëèïîìÄÅ
ÉæÆôöòûùÿÖÜ¢£¥₧ƒ
áíóúñѪº¿⌐¬½¼¡«»
░▒▓│┤╡╢╖╕╣║╗╝╜╛┐
└┴┬├─┼╞╟╚╔╩╦╠═╬╧
╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀
αßΓπΣσµτΦΘΩδ∞φε∩
≡±≥≤⌠⌡÷≈°∙·√ⁿ²■
|
|
|
▓▒▓▒░▒░ ░ ⌐¬⌐¬⌐¬⌐¬⌐¬ ═╗
█▓▒▓▒░ ░ ░ ≤ > ⌐¬⌐¬⌐¬⌐¬⌐¬ ║
▓█▓▒▓▒░▒░ ░ ░ ⌐¬⌐¬⌐¬ ╔╝
█▓█▓▒▓▒▓▒░▒░▒░ ▼▲ ⌐¬⌐¬ ╔╝
██▓█▓█▓▒▓▒▓▒▓▒░ ▼▲▼~ ╚╗
█▓█▓█▓█▓█▓█▓█▓▒░ ▼ ▼▲ ╚╗
▓█▓▒▓▒▓▒▓█▓▒▓▒░○▐▀▌○ ▼ ╚╗
█▓▒▓▒░▒░▒▓▒░▒░▄██▄█◙▄ ◥◤◢◣◥◤║
▓▒▓▒░▒░ ░▒░ ░ ∙█▌■▐█∙ ⇉ ⇊ ◢◣◥◤◢◣║
▒▓▒░ ░ ░ ░ ▀██▀██▀ ⇈ ⇇ ◥◤◢◣◥◤║
░▒░ ░ ○▐▄▌○ ЯR ┌┐ ◢◣◥◤◢◣║
▒░ ░ ┌─┐ ─┤╘╦╗ ╒═╝
░ ♥ ♠┌───┐┘ ▄▄▄▄ ┌─┐┌┐ ├─╢║ │
▒░♣ ♦│²√i│ ▐▄▌▐▄▌ │├┼┤│ ┼┤ ║╟───┘
░▒░ ┌└───┘ ▬█■▐▌■█▬ │ │├┐ ┼│╒╣║
▒░▒░└─┘ ▐▀▌▐▀▌ └──┘└┴┬┴┼┘╠╬╗┌┬┐
▓▒░▒░ ░ ▀▀▀▀ ╔═╤═══╧═╧═╝╚╬╛│
▒░ ░ ░ ║ └──┐ ╔══╝ │
░ ░ ░ ░ Σ ╚════╧═══╝ ╘╗
ᔧ o ṓ ╔════════╝
⎲ 깅 킸 令 ╔════╝
⎳ 丯 穴 ║
ꃿ ꤰꤻꤼ ╚═╗
a ﲄ ᄐᄄ b ║
シ ╔═══╝
⺋ ㅏ 䢝 ╔═══╝
䷝ ══════╝
|
▓▒░ ⌐¬═╗█≤>║╔╝▼▲ ~╚○▐▀▌▄◙◥◤◢◣∙■⇉⇊ ⇈⇇ЯR┌┐─┤╘╦╒♥♠┘├╢ │♣♦²√i┼╟└▬╣┴┬╠╬╤ ╧╛Σᔧoṓ⎲깅킸令⎳丯穴ꃿꤰꤻ ꤼaﲄᄐᄄbシ⺋ㅏ䢝䷝ details: char value hex ▓ 9619 0x2593 ▒ 9618 0x2592 ░ 9617 0x2591 32 0x20 ⌐ 8976 0x2310 ¬ 172 0xac ═ 9552 0x2550 ╗ 9559 0x2557 █ 9608 0x2588 ≤ 8804 0x2264 > 62 0x3e ║ 9553 0x2551 ╔ 9556 0x2554 ╝ 9565 0x255d ▼ 9660 0x25bc ▲ 9650 0x25b2 ~ 126 0x7e ╚ 9562 0x255a ○ 9675 0x25cb ▐ 9616 0x2590 ▀ 9600 0x2580 ▌ 9612 0x258c ▄ 9604 0x2584 ◙ 9689 0x25d9 ◥ 9701 0x25e5 ◤ 9700 0x25e4 ◢ 9698 0x25e2 ◣ 9699 0x25e3 ∙ 8729 0x2219 ■ 9632 0x25a0 ⇉ 8649 0x21c9 ⇊ 8650 0x21ca ⇈ 8648 0x21c8 ⇇ 8647 0x21c7 Я 1071 0x42f R 82 0x52 ┌ 9484 0x250c ┐ 9488 0x2510 ─ 9472 0x2500 ┤ 9508 0x2524 ╘ 9560 0x2558 ╦ 9574 0x2566 ╒ 9554 0x2552 ♥ 9829 0x2665 ♠ 9824 0x2660 ┘ 9496 0x2518 ├ 9500 0x251c ╢ 9570 0x2562 │ 9474 0x2502 ♣ 9827 0x2663 ♦ 9830 0x2666 ² 178 0xb2 √ 8730 0x221a i 105 0x69 ┼ 9532 0x253c ╟ 9567 0x255f └ 9492 0x2514 ▬ 9644 0x25ac ╣ 9571 0x2563 ┴ 9524 0x2534 ┬ 9516 0x252c ╠ 9568 0x2560 ╬ 9580 0x256c ╤ 9572 0x2564 ╧ 9575 0x2567 ╛ 9563 0x255b Σ 931 0x3a3 ᔧ 5415 0x1527 o 111 0x6f ṓ 7763 0x1e53 ⎲ 9138 0x23b2 깅 44613 0xae45 킸 53432 0xd0b8 令 20196 0x4ee4 ⎳ 9139 0x23b3 丯 20015 0x4e2f 穴 31348 0x7a74 ꃿ 41215 0xa0ff ꤰ 43312 0xa930 ꤻ 43323 0xa93b ꤼ 43324 0xa93c a 97 0x61 ﲄ 64644 0xfc84 ᄐ 65468 0xffbc ᄄ 65448 0xffa8 b 98 0x62 シ 65404 0xff7c ⺋ 11915 0x2e8b ㅏ 12623 0x314f 䢝 18589 0x489d ䷝ 19933 0x4ddd |
0000000: e296 93e2 9692 e296 93e2 9692 e296 91e2 ................ 0000010: 9692 e296 9120 e296 9120 2020 2020 2020 ..... ... 0000020: 2020 2020 2020 2020 e28c 90c2 ace2 8c90 ........ 0000030: c2ac e28c 90c2 ace2 8c90 c2ac e28c 90c2 ................ 0000040: ac20 e295 90e2 9597 0ae2 9688 e296 93e2 . .............. 0000050: 9692 e296 93e2 9692 e296 9120 e296 9120 ........... ... 0000060: e296 9120 2020 2020 2020 2020 e289 a420 ... ... 0000070: 3e20 2020 e28c 90c2 ace2 8c90 c2ac e28c > ............ 0000080: 90c2 ace2 8c90 c2ac e28c 90c2 ac20 e295 ............. .. 0000090: 910a e296 93e2 9688 e296 93e2 9692 e296 ................ 00000a0: 93e2 9692 e296 91e2 9692 e296 9120 e296 ............. .. 00000b0: 9120 e296 9120 2020 2020 2020 2020 2020 . ... 00000c0: 2020 2020 e28c 90c2 ace2 8c90 c2ac e28c ............ 00000d0: 90c2 ac20 e295 94e2 959d 0ae2 9688 e296 ... ............ 00000e0: 93e2 9688 e296 93e2 9692 e296 93e2 9692 ................ 00000f0: e296 93e2 9692 e296 91e2 9692 e296 91e2 ................ 0000100: 9692 e296 9120 2020 2020 2020 2020 e296 ..... .. 0000110: bce2 96b2 2020 2020 e28c 90c2 ace2 8c90 .... ........ 0000120: c2ac 20e2 9594 e295 9d0a e296 88e2 9688 .. ............. 0000130: e296 93e2 9688 e296 93e2 9688 e296 93e2 ................ 0000140: 9692 e296 93e2 9692 e296 93e2 9692 e296 ................ 0000150: 93e2 9692 e296 9120 2020 2020 2020 2020 ....... 0000160: e296 bce2 96b2 e296 bc7e 2020 2020 2020 .........~ 0000170: e295 9ae2 9597 0ae2 9688 e296 93e2 9688 ................ 0000180: e296 93e2 9688 e296 93e2 9688 e296 93e2 ................ 0000190: 9688 e296 93e2 9688 e296 93e2 9688 e296 ................ 00001a0: 93e2 9692 e296 9120 2020 2020 2020 e296 ....... .. ... .. . |
| i either get "" written at the top of my file or it fails to write entirely |
| I read around and apparently a BOM is not recommended? although it is supposed to be allowed under UTF-8? |
| I'm still a little unsure about my method to grab the decimal and hex values for each character, and somewhat puzzled as to why my hex values don't match up with the xxd terminal output...?: |
0000000 e2 96 93 e2 96 92 e2 96 93 e2 96 92 e2 96 91 e2 0000010 96 92 e2 96 91 20 e2 96 91 20 20 20 20 20 20 20 0000020 20 20 20 20 20 20 20 20 e2 8c 90 c2 ac e2 8c 90 0000030 c2 ac e2 8c 90 c2 ac e2 8c 90 c2 ac e2 8c 90 c2 0000040 ac 20 e2 95 90 e2 95 97 0a e2 96 88 e2 96 93 e2 0000050 96 92 e2 96 93 e2 96 92 e2 96 91 20 e2 96 91 20 0000060 e2 96 91 20 20 20 20 20 20 20 20 20 e2 89 a4 20 0000070 3e 20 20 20 e2 8c 90 c2 ac e2 8c 90 c2 ac e2 8c 0000080 90 c2 ac e2 8c 90 c2 ac e2 8c 90 c2 ac 20 e2 95 0000090 91 0a e2 96 93 e2 96 88 e2 96 93 e2 96 92 e2 96 00000a0 93 e2 96 92 e2 96 91 e2 96 92 e2 96 91 20 e2 96 00000b0 91 20 e2 96 91 20 20 20 20 20 20 20 20 20 20 20 00000c0 20 20 20 20 e2 8c 90 c2 ac e2 8c 90 c2 ac e2 8c 00000d0 90 c2 ac 20 e2 95 94 e2 95 9d 0a e2 96 88 e2 96 00000e0 93 e2 96 88 e2 96 93 e2 96 92 e2 96 93 e2 96 92 00000f0 e2 96 93 e2 96 92 e2 96 91 e2 96 92 e2 96 91 e2 0000100 96 92 e2 96 91 20 20 20 20 20 20 20 20 20 e2 96 0000110 bc e2 96 b2 20 20 20 20 e2 8c 90 c2 ac e2 8c 90 0000120 c2 ac 20 e2 95 94 e2 95 9d 0a e2 96 88 e2 96 88 0000130 e2 96 93 e2 96 88 e2 96 93 e2 96 88 e2 96 93 e2 0000140 96 92 e2 96 93 e2 96 92 e2 96 93 e2 96 92 e2 96 0000150 93 e2 96 92 e2 96 91 20 20 20 20 20 20 20 20 20 ... .. . |
wcout? do i need write a little function to translate the code-points myself? ...fwiw, I think that may be within my ability ;)dataout << L'\xFEFF';) into my ostream, it appears to actually encode the UTF-8 BOM(0000: EF BB BF) into my file. ...unexpected... L'\xFEFF' BOM:0000000 ef bb bf e2 96 93 e2 96 92 e2 96 91 20 e2 8c 90 |
0000000 e2 96 93 e2 96 92 e2 96 91 20 e2 8c 90 c2 ac e2 |
dataout << L'\xEF' << L'\xBB' << L'\xBF'; for my BOM, i then get "" visible at the top of my file, and my hex dump looks like this:0000000 c3 af c2 bb c2 bf e2 96 93 e2 96 92 e2 96 91 20 |
dataout << L'\xFEFF'; the preferred way to write the UTF-8 BOM using a wofstream?| ...so is it not possible to easily print the UTF-8 hex value via wcout? |
| That is, when i write the UTF-16 BOM(dataout << L'\xFEFF';) into my ostream, it appears to actually encode the UTF-8 BOM(0000: EF BB BF) into my file. |
| UTF-8 is not just 1 byte long |
| I was looking for an easy way to output UTF-8 code-points in hex |
| when i write the UTF-16 BOM into my ostream, it appears to actually encode the UTF-8 BOM |