The codec used by Qt for const char* and std::string don't necessarily have to be the same depending on locale. Therefore, we should be using the correct functions to do the conversions.