Reply to post: Re: add a proper string type in C

Clutching at its Perl 6, developer community ponders language name with less baggage

Xiox

Re: add a proper string type in C

No - don't use wstring unless you have to, as it's mostly broken. You'd either need 32 bit characters for the whole of unicode (on linux), wasting enormous amounts of space, or encode things into 16 bit characters (on windows). For example: https://stackoverflow.com/questions/11107608/whats-wrong-with-c-wchar-t-and-wstrings-what-are-some-alternatives-to-wide

Instead, the best approach is to use std::string, and encode everything as UTF-8.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon