MySQL Forums
Forum List  »  Connector/C++

Re: connector/c++ and unicode
Posted by: S V
Date: January 31, 2010 04:59AM

IMHO std::wstring has quite limited application and it is not a 'unicode' string, it is 'wide' string, it means std::wstring will use some fixed-length encoding sufficient to represent any char of some subset. If your target language(C++ in this case) does not have native unicode support in any form, then there is nothing you can do. Better strategy is to pass std::strings within your program(in any encoding of your choice) and convert them to external OS/GUI library encoding when data should be presented to a user or written to a file.
Only one drawback of this strategy is the impossibility to manipualte MBCS data via std::string interface. From this point of view std::string is a container used to pass data across program.

Options: ReplyQuote


Subject
Views
Written By
Posted
5553
January 13, 2010 04:58PM
2907
January 22, 2010 12:40PM
2909
January 24, 2010 11:28AM
Re: connector/c++ and unicode
3714
S V
January 31, 2010 04:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.