Greetings, Darshit Shah
This was disscussed some (or long) time ago.
Possible logic:
If locale isn't UTF-8 then process as before else
1. Convert string to WideCharString with mbstowcs().
2. For Each WideChar check it size with wctomb(). If size is 1 then compare it with mask.
If char restricted, then "quoted++;"
3. If need, convert to lower/upper case with towlower()/towupper()
4. Recreate string char by char with wctomb: Convert char to temporary buffer. If
filechar size is 1 compare with mask and repalce. Else "memcpy(q, char_buffer,
char_size); q+=char_size;"
In windows i can't check it ( mbstowcs didn't work with UTF-8, so must be used
MultiByteToWideChar()...)
Patch for windows (unstructured, unclear, unfinished, but worked) is attached.
Best Regards, Bykov Aleksey.