wstring Questions
4
I would like to convert wstring to wchar_t*. I have tried everything what i know, please help.
I would like to convert wstring to wchar_t*.
10
Solved
I have a wstring declared as such:
// random wstring
std::wstring str = L"abcàdëefŸg€hhhhhhhµa";
The literal would be UTF-8 encoded, because my source file is.
[EDIT: According to Mark Ransom t...
21
Solved
The question is how to convert wstring to string?
I have next example :
#include <string>
#include <iostream>
int main()
{
std::wstring ws = L"Hello";
std::string s( ws.begin(), ws...
14
20
string s = "おはよう";
wstring ws = FUNCTION(s, ws);
How would i assign the contents of s to ws?
Searched google and used some techniques but they can't assign the exact content. The content is dist...
8
Solved
I need to convert between wstring and string. I figured out, that using codecvt facet should do the trick, but it doesn't seem to work for utf-8 locale.
My idea is, that when I read utf-8 encoded ...
4
Solved
11
Solved
I am using std::string's find() method to test if a string is a substring of another. Now I need case insensitive version of the same thing. For string comparison I can always turn to stricmp() but...
Vasectomy asked 30/6, 2010 at 18:28
7
5
Solved
I had the code:
std::string st = "SomeText";
...
std::cout << st;
and that worked fine. But now my team wants to move to wstring.
So I tried:
std::wstring st = "SomeText";
...
std::cout &...
3
Solved
I want to convert wstring to u16string in C++.
I can convert wstring to string, or reverse. But I don't know how convert to u16string.
u16string CTextConverter::convertWstring2U16(wstring str)
{...
Sailmaker asked 11/3, 2017 at 11:38
6
Solved
I know that there are already several questions on StackOverflow about std::string versus std::wstring or similar but none of them proposed a full solution.
In order to obtain a good answer I sho...
Signore asked 10/1, 2010 at 17:13
5
Solved
I programmed a little Application in C++. There is a ListBox in the UI. And I want to use the selected Item of ListBox for an Algorithm where I can use only wstrings.
All in all I have two questio...
Yahoo asked 26/12, 2012 at 23:7
2
Solved
I have a file that contains text, I would like to get each line from this file into a std::wstring variable.If I do this I get an error, so is it possible to use std::wstring or I'm obligate to use...
1
Solved
1
Solved
My main platform is Windows which is the reason why I use internally UTF-16 (mostly BMP strings).
I would like to use console output for these strings.
Unfortunately there is no std::u16cout or st...
2
SUMMARY
How can I write a zip file using libarchive in C++, such that path names will be UTF-8 encoded? With UTF-8 path names, special characters will be decoded correctly when using OS X / Linux ...
Neral asked 3/12, 2014 at 9:31
4
Solved
How can I convert from CString to std::wstring?
2
Solved
Consider this function to convert narrow strings to wide strings:
std::wstring convert(const std::string& input)
{
try
{
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> c...
4
Solved
I have Windows registry key value in wstring format. Now I want to pass it to this code (first argument - path to javaw.exe):
std::wstring somePath(L"....\\bin\\javaw.exe");
if (!CreateProcess("...
Summertime asked 23/3, 2014 at 0:3
1
Solved
Some information:
I've only tried this on Linux
I've tried both with GCC (7.2.0) and Clang (3.8.1)
It requires C++11 or higher to my understanding
What happens when I run it
I get the expected...
1
Solved
This question shows how to split a string into a vector using a single character delimeter.
Question: Right way to split an std::string into a vector
However, applying this technique to wstring i...
6
Solved
I am having this std::string which contains some characters that span multiple bytes.
When I do a substring on this string, the output is not valid, because ofcourse, these characters are counted ...
Sole asked 1/6, 2012 at 8:34
6
Solved
What's the best way to convert std::wstring to numeric type, such as int, long, float or double?
4
Solved
I am using std::wstring as my Unicode style string. Now I want to get the
byte size of a wstring.
If I use size() method of wstring, I just get the total number of chars
in my wstring. But the b...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.