Я начал просто чистить свои имена файлов от всех специальных символов. Я придумал таблицу отображения, которая должна отображать большинство часто используемых символов.
//http://www.pjb.com.au/comp/diacritics.html
private static string[,] CharacterReplacements = {
{ " ", "-"},
{ "&", "-"},
{ "?", "-"},
{ "!", "-"},
{ "%", "-"},
{ "+", "-"},
{ "#", "-"},
{ ":", "-"},
{ ";", "-"},
{ ".", "-"},
{ "¢", "c" }, //cent
{ "£", "P" }, //Pound
{ "€", "E" }, //Euro
{ "¥", "Y" }, //Yen
{ "°", "d" }, //degree
{ "¼", "1-4" }, //fraction one-quarter
{ "½", "1-2" }, //fraction half
{ "¾", "1-3" }, //fraction three-quarters}
{ "@", "AT)"}, //at
{ "Œ", "OE" }, //OE ligature, French (in ISO-8859-15)
{ "œ", "oe" }, //OE ligature, French (in ISO-8859-15)
{"Å","A" }, //ring
{"Æ","AE"}, //diphthong
{"Ç","C" }, //cedilla
{"È","E" }, //grave accent
{"É","E" }, //acute accent
{"Ê","E" }, //circumflex accent
{"Ë","E" }, //umlaut mark
{"Ì","I" }, //grave accent
{"Í","I" }, //acute accent
{"Î","I" }, //circumflex accent
{"Ï","I" }, //umlaut mark
{"Ð","Eth"}, //Icelandic
{"Ñ","N" }, //tilde
{"Ò","O" }, //grave accent
{"Ó","O" }, //acute accent
{"Ô","O" }, //circumflex accent
{"Õ","O" }, //tilde
{"Ö","O" }, //umlaut mark
{"Ø","O" }, //slash
{"Ù","U" }, //grave accent
{"Ú","U" }, //acute accent
{"Û","U" }, //circumflex accent
{"Ü","U" }, //umlaut mark
{"Ý","Y" }, //acute accent
{"Þ","eth"}, //Icelandic - http://en.wikipedia.org/wiki/Thorn_(letter)
{"ß","ss"}, //German
{"à","a" }, //grave accent
{"á","a" }, //acute accent
{"â","a" }, //circumflex accent
{"ã","a" }, //tilde
{"ä","ae"}, //umlaut mark
{"å","a" }, //ring
{"æ","ae"}, //diphthong
{"ç","c" }, //cedilla
{"è","e" }, //grave accent
{"é","e" }, //acute accent
{"ê","e" }, //circumflex accent
{"ë","e" }, //umlaut mark
{"ì","i" }, //grave accent
{"í","i" }, //acute accent
{"î","i" }, //circumflex accent
{"ï","i" }, //umlaut mark
{"ð","eth"}, //Icelandic
{"ñ","n" }, //tilde
{"ò","o" }, //grave accent
{"ó","o" }, //acute accent
{"ô","o" }, //circumflex accent
{"õ","o" }, //tilde
{"ö","oe"}, //umlaut mark
{"ø","o" }, //slash
{"ù","u" }, //grave accent
{"ú","u" }, //acute accent
{"û","u" }, //circumflex accent
{"ü","ue"}, //umlaut mark
{"ý","y" }, //acute accent
{"þ","eth"}, //Icelandic - http://en.wikipedia.org/wiki/Thorn_(letter)
{"ÿ","y" }, //umlaut mark
};
Или вы можете получить весь код здесь:
http://remy.supertext.ch/2012/08/clean-filenames/
Дайте мне знать, если найдете недостающие символы.