It is true that if you were to try to convert a std::string containing the nul char to a c style char* string then it would be truncated at the first 0.
Andrew,
Yes!. Correct. This happened some time back when I was working on an application which was supposed to send binary data over wire. There of course what I received was a C string and hence the parsing stopped when it reached the first NULL. But even that could be handled safely if we give the length as the second parameter when we construct the std::string object.
Danushka -- Danushka Menikkumbura Technical Lead, WSO2 Inc. blog : http://danushka-menikkumbura.blogspot.com/ http://wso2.com/ - "The Open Source SOA Company"
