I have some strings read from the database, stored in a char* and in UTF-8 format (you know, \"á\" is encoded as 0xC3 0xA1). But, in order to write them to a file, I first n
If you mean ASCII, just discard any byte that has bit 7 set, this will remove all multibyte sequences. Note that you could create more advanced algorithms, like removing the accent from the "á", but that would require much more work.