Merge pull request #2865 from vyv03354/90pv

Implement "90pv" CMap
This commit is contained in:
Yury Delendik 2013-03-02 09:31:07 -08:00
commit de9f0a9435
3 changed files with 23 additions and 0 deletions

View File

@ -412,6 +412,7 @@ var CMapConverterList = {
'EUC-H': eucjpToUnicode,
'EUC-V': eucjpToUnicode,
'83pv-RKSJ-H': sjis83pvToUnicode,
'90pv-RKSJ-H': sjis90pvToUnicode,
'90ms-RKSJ-H': sjisToUnicode,
'90ms-RKSJ-V': sjisToUnicode,
'90msp-RKSJ-H': sjisToUnicode,
@ -479,6 +480,18 @@ function sjis83pvToUnicode(str) {
}
}
function sjis90pvToUnicode(str) {
var bytes = stringToBytes(str);
try {
// TODO: 90pv has incompatible mappings in 8740..879c and eb41..ee9c.
return decodeBytes(bytes, 'shift_jis', true);
} catch (e) {
TODO('Unsupported 90pv character found');
// Just retry without checking errors for now.
return decodeBytes(bytes, 'shift_jis');
}
}
function gbkToUnicode(str) {
return decodeBytes(stringToBytes(str), 'gbk');
}

View File

@ -0,0 +1 @@
http://image.haier.com/manual/japan/wash_machine/201211/P020121130574743273239.pdf

View File

@ -930,6 +930,15 @@
"rounds": 1,
"type": "eq"
},
{ "id": "p020121130574743273239",
"file": "pdfs/P020121130574743273239.pdf",
"md5": "271b65885d42d174cbc597ca89becb1a",
"rounds": 1,
"link": true,
"firstPage": 1,
"lastPage": 1,
"type": "eq"
},
{ "id": "sfaa_japanese",
"file": "pdfs/SFAA_Japanese.pdf",
"md5": "b961bbc0d05bdd6d91041bca60ec8e8b",