CommenTator thanks you really much
Your example works perfectly.
I reached to handle the BOM a bit in meantime :
w1 = fgetwc( fIn );
w2 = fgetwc( fIn );
// Check for utf16 BOM
if ( w1 == 0xFF && w2 == 0xFE )
{
fgetws( wsInBuffer ,nWords , fIn ); // terminates with 0
WideCharToMultiByte ( CP_UTF8, // UTF8 => lpDefaultChar and lpUsedDefaultChar must be set to NULL
0, // must be 0 for CP_UTF8
wsInBuffer, // Pointer to the Unicode string to convert
nWords, // can be set set to -1 if the string is null-terminated
wsMbBuffer, // Target
100,
NULL, NULL ); // For the CP_UTF8 setting for CodePage must be set to NULL
SetDlgItemText ( hwnd, IDC_TEXT, (LPCWSTR) wsMbBuffer );
I m not sure if to continue trying for BOM
or if to leave that part out
because Windows Editor itself uses it..
I think for compatibility (i.e. Linux)
it should be worth it ?
Scared a bit to produce tons of .txt
wich can t be handled later cause of missing file identifier ><
Again thank you all for the help !