public static String createFilename( String name ) {
    StringBuilder filename = new StringBuilder();
    for ( int i = 0; i < name.length(); i++ ) {
      char c = name.charAt( i );
      if ( Character.isUnicodeIdentifierPart( c ) ) {
        filename.append( c );
      } else if ( Character.isWhitespace( c ) ) {
        filename.append( '_' );
      }
    }
    return filename.toString().toLowerCase();
  }
@Test
  public void testCreateFilename() {
    assertEquals( "dir" + Const.FILE_SEPARATOR + "file__1.ext", Const.createFilename( "dir" + Const.FILE_SEPARATOR,
        "File\t~ 1", ".ext" ) );
    assertEquals( "dir" + Const.FILE_SEPARATOR + "file__1.ext", Const.createFilename( "dir", "File\t~ 1", ".ext" ) );
  }