名前にダッシュ ("\u2013") が含まれる SVN のリポジトリにフォルダーがあります。ディレクトリのリストを取得するために、最初に「svn list」(私の Windows 7 + UTF-8 エンコーディング) を呼び出しています。その後、BufferedReader readLine() を呼び出して、リストのテキストを読み取ります。表示されているフォルダーの名前には、ダッシュ ("\u2013") の代わりにハイフン ("\u002D") が含まれています。
それに関して制限はありますか?
class Test {
public static void main(String args[]) {
BufferedReader br = null;
try {
String sCurrentLine;
br = new BufferedReader(new FileReader("C:\\test–ing.xml"));
System.out.println(br.readLine());
while ((sCurrentLine = br.readLine()) != null) {
System.out.println(sCurrentLine);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (br != null)
br.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
} // end main