diff --git a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy index 0f2b860f..03581890 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;[:Diacritic:]remove").replaceAll("[^\\p{ASCII}]", "?") } +String.metaClass.ascii = { fallback = '?' -> delegate.transliterate("Any-Latin;Latin-ASCII;[:Diacritic:]remove").replaceAll("[^\\p{ASCII}]", fallback) }