@Test public void stripUnsafeCharactersUnicode() { assertEquals("AA", strategy.stripUnsafeCharacters("\u00C0\u00C1")); }
protected String stripUnsafeCharacters(String candidate) { String safe = Normalizer.normalize(candidate, Normalizer.Form.NFD); safe = safe.replaceAll("\\p{IsM}+", "").replaceAll("[^a-zA-Z0-9]+", "-"); return safe; }
DefaultSplittingStrategy extends SplittingStrategy { protected String stripUnsafeCharacters(String candidate) { String safe = Normalizer.normalize(candidate, Normalizer.Form.NFD); safe = safe.replaceAll("\\p{IsM}+", "").replaceAll("[^a-zA-Z0-9]+", "-"); return safe; } }
DefaultSplittingStrategy extends SplittingStrategy { protected String stripUnsafeCharacters(String candidate) { String safe = Normalizer.normalize(candidate, Normalizer.Form.NFD); safe = safe.replaceAll("\\p{IsM}+", "").replaceAll("[^a-zA-Z0-9]+", "-"); return safe; }  }
DefaultSplittingStrategy extends SplittingStrategy { protected String stripUnsafeCharacters(String candidate) { String safe = Normalizer.normalize(candidate, Normalizer.Form.NFD); safe = safe.replaceAll("\\p{IsM}+", "").replaceAll("[^a-zA-Z0-9]+", "-"); return safe; }  @Override void heading(int level, String id, String label); @Override String getSplitTarget(); @Override boolean isSplit(); int getFirstHeadingSplit(); void setFirstHeadingSplit(int firstHeadingSplit); int getSplitLevel(); void setSplitLevel(int splitLevel); }
DefaultSplittingStrategy extends SplittingStrategy { protected String stripUnsafeCharacters(String candidate) { String safe = Normalizer.normalize(candidate, Normalizer.Form.NFD); safe = safe.replaceAll("\\p{IsM}+", "").replaceAll("[^a-zA-Z0-9]+", "-"); return safe; }  @Override void heading(int level, String id, String label); @Override String getSplitTarget(); @Override boolean isSplit(); int getFirstHeadingSplit(); void setFirstHeadingSplit(int firstHeadingSplit); int getSplitLevel(); void setSplitLevel(int splitLevel);  }