Some guy goes "I can do that" only to admit 3 posts later that he'd lied
"Some guy" was our young friend Farabi, and nobody else here would ever call him a liar.
Back to content: I have compiled your test case, no error messages, fine, but when I feed a real UTF-8 file with Russian, Arabic and Chinese characters, I get this on screen:
Reading Utf8.txt
File open...
File content...
↕2548B5 B5:AB 745AL
↔06<8B5 =0 MBC :=>?:C
¶>1@> ?>60;>20BL
#/.D 'DF5 GF'
/A9 G0' 'D21
E1-(' (CE
(↓ß8eçW
♂↓♂ §
a╬
(null)
File closed...
Expected outcome is this:
UTF-8 text file created, now reading & printing
Введите текст здесь
Нажмите на эту кнопку
Добро пожаловать
أدخل النص هنا
دفع هذا الزر
مرحبا بكم
在這裡輸入文字
按一下這個按鈕
歡迎I attach my version (the *.asc source opens best in RichMasm, but WordPad and Ms Word work, too).
Note that I tried it from the commandline, too, using chcp 65001 and Lucida Console. Inside the same console window, my proggie WideReadWrite.exe displays the exotic languages just fine, yours produces garbage. It's a mystery. Could it be the wprintf(L... ?
P.S.: With English UTF-8 text, your library works just fine :t