Le 06/10/2015 20:03, Guillaume Munch a écrit :
Le 06/10/2015 18:28, Jean-Marc Lasgouttes a écrit :
For the docstring part of the code, I am not sure what code like the
following do:
- LASSERT(static_cast<unsigned char>(*c) < 0x80, return l);
- s.push_back(*c);
+ if (static_cast<unsigned char>(*c) < 0x80)
+ s.push_back(*c);
+ else
+ return s += from_utf8(string(c));
There is nothing magic about from_utf8(string(c)), right? This is just
accepting latin1 characters, or am I blind?
To be more precise, it accepts Latin-1 characters that are part of the
ASCII subset, yes, if that was your remark :)
In the meanwhile I understood that probably the precision that you need
is that c is a C string that denotes the suffix of r and string(c)
converts the whole remainder of r into a c++ string, not just the next char.