1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

+ String.asciiQuotes() to normalize wierd quotation marks (e.g. "\u00b4\u2018\u2019\u02bb".asciiQuotes() == "''''")

This commit is contained in:
Reinhard Pointner 2015-06-04 17:21:02 +00:00
parent 8a77762e34
commit 10704bc216

View File

@ -17,8 +17,8 @@ public class Normalization {
private static final Pattern checksum = compile("[\\(\\[]\\p{XDigit}{8}[\\]\\)]"); private static final Pattern checksum = compile("[\\(\\[]\\p{XDigit}{8}[\\]\\)]");
private static final char[] doubleQuotes = new char[] { '\"', '\u0060', '\u00b4', '\u2018', '\u2019', '\u02bb' }; private static final char[] doubleQuotes = new char[] { '\'', '\u0060', '\u00b4', '\u2018', '\u2019', '\u02bb' };
private static final char[] singleQuotes = new char[] { '\'', '\u201c', '\u201d' }; private static final char[] singleQuotes = new char[] { '\"', '\u201c', '\u201d' };
public static String normalizeQuotationMarks(String name) { public static String normalizeQuotationMarks(String name) {
for (char[] cs : new char[][] { doubleQuotes, singleQuotes }) { for (char[] cs : new char[][] { doubleQuotes, singleQuotes }) {