I'm trying to convert a UTF-8 string
to a ISO-8859-1 char*
for use in legacy code. The only way I'm seeing to do this is with iconv
.
I would definitely prefer a completely string
-based C++ solution then just call .c_str()
on the resulting string.
How do I do this? Code example if possible, please. I'm fine using iconv
if it is the only solution you know.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…