c++ - Deprecated header <codecvt> replacement -


a bit of foreground: task required converting utf-8 xml file utf-16 (with proper header, of course). , searched usual ways of converting utf-8 utf-16, , found out should use templates <codecvt>.

but when deprecated, wonder new common way of doing same task?

(don't mind using boost @ all, other prefer stay close standard library possible.)

std::codecvt template <locale> isn't deprecated. utf-8 utf-16, there still std::codecvt<char16_t, char, std::mbstate_t> specialization.

however, since std::wstring_convert , std::wbuffer_convert deprecated along standard conversion facets, there isn't easy way convert strings using facets.

so, bolas answered: implement - or use third party library.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

python - Error: Unresolved reference 'selenium' What is the reason? -

asp.net ajax - Jquery scroll to element just goes to top of page -