Click here to Skip to main content
15,066,496 members
Articles / Programming Languages / C++
Alternative
Tip/Trick
Posted 14 May 2011

Tagged as

Stats

6.5K views
3 bookmarked

ASCII strings to Unicode in C++

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
14 May 2011CPOL
inline std::wstring AsciiToUnicode(std::string text){ // Could do some DEBUG check here to ensure it is really ASCII. // Also, if in the future, it is found, it is not the case, // it would much easier to update code. // Same as jean Davy here... return...
inline std::wstring AsciiToUnicode(std::string text)
{
    // Could do some DEBUG check here to ensure it is really ASCII.
    // Also, if in the future, it is found, it is not the case, 
    // it would much easier to update code.

    // Same as jean Davy here...
    return std::wstring(text.begin(), text.end());
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Philippe Mori
Software Developer (Senior)
Canada Canada
Programmer at Maid LABS from 2003 (www.maidlabs.com)

Programmer-Analyst at Viasat Geo Technoligies from 1995 to 2002 (www.viasat-geo.com).

I have studied at École Polytechnique de Montréal in computer engineering.

Comments and Discussions

 
-- There are no messages in this forum --