You only ever call the parent function (SmartDetectXmlEncoding) with a std::string anyway.  You'll still take the shorter copy here, but this time from the std::string not the const char * that was a std::string a function call ago anyway.

If sometime in the future it turns out that you'll absolutely have to have a const char* passed to this function (given it will be private, this is unlikely) then you can add it at that point.