https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108976
--- Comment #4 from Dimitrij Mijoski <dmjpp at hotmail dot com> --- I have fixed this, added large testsute and discovered another bug in codecvt_utf16 when the input [from, from_end) contains odd number of bytes. Error was returned instead of partial. Here are the changes in 8 commits https://github.com/gcc-mirror/gcc/compare/master...dimztimz:gcc:codecvt (read from top to bottom). Do you want everything squashed in one commit or maybe some other combination?