OSDN Git Service

ダメ文字置換処理を更新。
authoryuki <yuki@c066991c-cf13-ec4a-a49a-846e61667af5>
Fri, 18 Dec 2009 11:54:10 +0000 (11:54 +0000)
committeryuki <yuki@c066991c-cf13-ec4a-a49a-846e61667af5>
Fri, 18 Dec 2009 11:54:10 +0000 (11:54 +0000)
git-svn-id: http://192.168.11.7/svn/saccubus/trunk@302 c066991c-cf13-ec4a-a49a-846e61667af5

frontend/src/saccubus/converter/filegetter/WebFileInstanciator.java

index 893c41a..b79d085 100644 (file)
@@ -73,9 +73,12 @@ public class WebFileInstanciator extends FileInstanciator {
     @Override
     public String getVideoTitle() {
         String name = videoInfo.getVideoTitle().replaceAll("[\\\\/:*?\"<>|.]", "_");
-        name = name.replaceAll("\u2212", "\81|"); // minus sign
-        name = name.replaceAll("\u301c", "\81`"); // wave dash
-        name = name.replaceAll("\u223c", "\81`"); // tilde operator
+        name = name.replace('\u2212', '\uff0d'); // \81| U+2212(MINUS SIGN) -> U+FF0D(FULLWIDTH HYPHEN-MINUS)
+        name = name.replace('\u301c', '\uff5e'); // \81` U+301C(WAVE DASH) -> U+FF5E(FULLWIDTH TILDE)
+        name = name.replace('\u223c', '\uff5e'); // \81` U+223C(TILDE OPERATOR) -> U+FF5E(FULLWIDTH TILDE)
+        name = name.replace('\u00a2', '\uffe0'); // \81\91 U+00A2(CENT SIGN) -> U+FFE0(FULLWIDTH CENT SIGN)
+        name = name.replace('\u00a3', '\uffe1'); // \81\92 U+00A3(POUND SIGN) -> U+FFE1(FULLWIDTH POUND SIGN)
+        name = name.replace('\u00ac', '\uffe2'); // \81Ê U+00AC(NOT SIGN) -> U+FFE2(FULLWIDHT NOT SIGN)
         return name;
     }
 }