Sign in to follow this  

No codecvt_utf16 or codecvt_utf8 in Linux...

This topic is 2666 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In MSVC I'm writing out wide strings and text to files using codecvt_utf16 or codecvt_utf8 (#include <codecvt>), but I'm trying to port my code. Right now I'm stuck with a null codecvt which works only because the Unicode chars I'm using are limited to two bytes, but 1) this is not good for future maintenance and 2) I can't use UTF-8. I haven't found a free version of these facets I can use on Linux, and I don't want to risk writing my own after I've read about how many ones are buggy in the implementation.

Does anyone reading this have a pointer to a correct and free implementation?

I thought of using char16_t and u16string, since then I assume I don't need a codecvt, but I don't see a way to write string literals (prepending u or U works in recent gcc but not in MSVC).

[Edited by - Prune on August 28, 2010 1:54:12 AM]

Share this post


Link to post
Share on other sites

This topic is 2666 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this