lundi 26 mai 2014

iconv() - How to determine the requires size for output buffer?


Vote count:

0




In my C++ code, I need to convert Unicode strings to UTF-8 strings using iconv(). Before calling the function, I need to allocate proper buffer size. A couple of examples I have seen overallocate the buffer (for example, two times the length of input string). I am wondering if there is a way to determine the exact size that would be required for the conversion. Regards.



asked 39 secs ago

Peter

845





Aucun commentaire:

Enregistrer un commentaire