HPSF: new testcase to check the new codepage support - plus a fix to correct a bug detected by the testcase. Hey, that's what testcases are good for!