From 67fe97c3452eb6ec21da4eca75ee486b93526f75 Mon Sep 17 00:00:00 2001
From: Reinhard Pointner
Date: Fri, 10 Feb 2012 04:33:23 +0000
Subject: [PATCH] * account for diacritical marks when normalizing filenames
---
.../net/sourceforge/filebot/format/ExpressionFormat.lib.groovy | 2 +-
website/naming.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy
index bfb0573f..0f2b860f 100644
--- a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy
+++ b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy
@@ -132,4 +132,4 @@ String.metaClass.transliterate = { transformIdentifier -> com.ibm.icu.text.Trans
* e.g. "Österreich" -> "Osterreich"
* "カタカナ" -> "katakana"
*/
-String.metaClass.ascii = { delegate.transliterate("Any-Latin;Latin-ASCII").replaceAll("[^\\p{ASCII}]", "?") }
+String.metaClass.ascii = { delegate.transliterate("Any-Latin;Latin-ASCII;[:Diacritic:]remove").replaceAll("[^\\p{ASCII}]", "?") }
diff --git a/website/naming.html b/website/naming.html
index b41cfac3..b1122e7e 100644
--- a/website/naming.html
+++ b/website/naming.html
@@ -120,7 +120,7 @@
E:/Complete/{n} ({y}){'/Season '+s}/{s+'x'}{e.pad(2)} - {t}
Rename and move files. The directory structure is completely up to you.
- {n.replaceTrailingBrackets()} - {s+'x'}{e.pad(2)} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´]/, "'").lowerTrail().replacePart(', Part $1')}
My personal favorite. Pretty much 1x01, but with lots of cleanup operations.
+ {n.replaceTrailingBrackets()} - {s+'x'}{e.pad(2)} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'")
.lowerTrail().replacePart(', Part $1')}
My personal favorite. Pretty much 1x01, normalizing accents, and lots of other cleanup operations.