getcp: locale independent utility to read the current code page