You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.
It looks like there is an issue when using this under Windows and there are unicode characters. The code in parse_string does not appear to work. It might be due to the implementation of stringstream.
In the code for parse_string, there is the following code:
case 'u':
int i;
std::stringstream ss;
for( i = 0; (!input.eof() && input.good()) && i < 4; ++i ) {
input.get(ch);
ss << ch;
}
if( input.good() && (ss >> i) )
value.push_back(i);
Using Visual Studio 2013, ss >> i, on the stream "000d" makes i == 0, which means that there are embedded nuls. I'm not even sure what (ss >> i) is supposed to return when cast to a bool.
The text was updated successfully, but these errors were encountered:
ss >> i is supposed to return the state of the stream. Not the extracted character. So ss >> i should return true regardless of whether or not there are embedded nulls.
I'm not sure what the issue is then. I'll have to double check. The issue I'm having is that when I step through the code I'm getting nulls added to value.
"\u000d" should parse integer to 0x0d according other utf-8 escaped tests.
we could add this case to the escaped utf-8 tests and ensure it is not broken at the moment
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It looks like there is an issue when using this under Windows and there are unicode characters. The code in parse_string does not appear to work. It might be due to the implementation of stringstream.
In the code for parse_string, there is the following code:
case 'u':
int i;
std::stringstream ss;
for( i = 0; (!input.eof() && input.good()) && i < 4; ++i ) {
input.get(ch);
ss << ch;
}
if( input.good() && (ss >> i) )
value.push_back(i);
Using Visual Studio 2013, ss >> i, on the stream "000d" makes i == 0, which means that there are embedded nuls. I'm not even sure what (ss >> i) is supposed to return when cast to a bool.
The text was updated successfully, but these errors were encountered: