Internally, stringstream is treating unsigned or normal chars as ASCII characters instead of numbers.