If the source is ASCII encoded, you can just do this:
wstring printerName;
printerName.assign( myName.begin(), myName.end() );
More Related Contents:
- std::wstring VS std::string
- Convert CString to const char*
- Convert a unicode String In C++ To Upper Case
- Convert between string, u16string & u32string
- How do I convert from LPCTSTR to std::string?
- Specification of source charset encoding in MSVC++, like gcc “-finput-charset=CharSet”
- How do I read an entire file into a std::string in C++?
- std::string formatting like sprintf
- How to determine if a string is a number with C++?
- C++ convert string to hexadecimal and vice versa
- printf with std::string?
- Macro for dllexport/dllimport switch
- How do I check if a C++ std::string starts with a certain string, and convert a substring to an int?
- What exactly is the L prefix in C++?
- Unicode Processing in C++
- Why floating point value such as 3.14 are considered as double by default in MSVC?
- How to make my split work only on one real line and be capable to skip quoted parts of string?
- How to play or open *.mp3 or *.wav sound file in c++ program? [closed]
- “” + something in C++
- Why does libc++’s implementation of std::string take up 3x memory as libstdc++?
- converting a variable name to a string in C++
- How-to write a password-safe class?
- Hash function for a string
- Copying non null-terminated unsigned char array to std::string
- Getline keeps on getting newline character. How can I avoid this?
- Directly write into char* buffer of std::string
- How to convert int to string in C++
- Possible problems with NOMINMAX on Visual C++
- Assign a string literal to a char* [duplicate]
- reading an application’s manifest file?