@@ -1336,10 +1336,23 @@ func decodeString(data []byte, length int) (v string, n int) {
13361336
13371337// Replaces smart quotes with ASCII equivalents
13381338func normalizeSmartQuotes (content []byte ) []byte {
1339- content = bytes .ReplaceAll (content , []byte ("‘" ), []byte ("'" ))
1340- content = bytes .ReplaceAll (content , []byte ("’" ), []byte ("'" ))
1341- content = bytes .ReplaceAll (content , []byte ("“" ), []byte ("\" " ))
1342- content = bytes .ReplaceAll (content , []byte ("”" ), []byte ("\" " ))
1339+ content = bytes .ReplaceAll (content , []byte {0xE2 , 0x80 , 0x99 }, []byte ("'" )) // '
1340+ content = bytes .ReplaceAll (content , []byte {0xE2 , 0x80 , 0x9C }, []byte ("\" " )) // "
1341+ content = bytes .ReplaceAll (content , []byte {0xE2 , 0x80 , 0x9D }, []byte ("\" " )) // "
1342+
1343+ content = bytes .ReplaceAll (content , []byte {0x91 }, []byte ("'" )) // '
1344+ content = bytes .ReplaceAll (content , []byte {0x92 }, []byte ("'" )) // '
1345+ content = bytes .ReplaceAll (content , []byte {0x93 }, []byte ("\" " )) // "
1346+ content = bytes .ReplaceAll (content , []byte {0x94 }, []byte ("\" " )) // "
1347+
1348+ content = bytes .ReplaceAll (content , []byte {0x85 }, []byte ("..." )) // …
1349+ content = bytes .ReplaceAll (content , []byte {0x96 }, []byte ("-" )) // –
1350+ content = bytes .ReplaceAll (content , []byte {0x97 }, []byte ("--" )) // —
1351+
1352+ content = bytes .ReplaceAll (content , []byte ("’" ), []byte ("'" )) // Corrupted '
1353+ content = bytes .ReplaceAll (content , []byte ("“" ), []byte ("\" " )) // Corrupted "
1354+ content = bytes .ReplaceAll (content , []byte ("â€\x9d " ), []byte ("\" " )) // Corrupted "
1355+
13431356return content
13441357}
13451358
0 commit comments