Jump to content
  • Advertisement
Sign in to follow this  
Prune

No codecvt_utf16 or codecvt_utf8 in Linux...

This topic is 2884 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!