using std::locale::classic() for calls to std::toupper() and std::tolower() [added missing calls]