Need to get a copy of the string since stored pointer is affected by subsequent calls of setlocale().