setlocale returns a string in static storage, so must use strdup