Return encoding instead of codepage when getting encoding from locale