+ 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
1 changed files with 2 additions and 2 deletions

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 }) {