code: private static String convertToASCIIEncoding(String fileName, boolean isPath) {
          String ret = fileName;
  
          ret = ret.replace("ä", "ae");
          ret = ret.replace("ö", "oe");
          ret = ret.replace("ü", "ue");
          ret = ret.replace("Ä", "Ae");
          ret = ret.replace("Ö", "Oe");
          ret = ret.replace("Ü", "Ue");
          ret = ret.replace("ß", "ss");
  
          // ein Versuch zu vereinfachen
          ret = cleanUnicode(ret);
  
          ret = removeIllegalCharacters(ret, isPath);
  
          //convert our filename to OS encoding...
          try {
              final CharsetEncoder charsetEncoder = Charset.forName("US-ASCII").newEncoder();
              charsetEncoder.onMalformedInput(CodingErrorAction.REPLACE); // otherwise breaks on first unconvertable char
              charsetEncoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
              charsetEncoder.replaceWith(new byte[]{'_'});
  
              final ByteBuffer buf = charsetEncoder.encode(CharBuffer.wrap(ret));
              if (buf.hasArray()) {
                  ret = new String(buf.array());
              }
  
              //remove NUL character from conversion...
              ret = ret.replaceAll("\\u0000", "");
          } catch (CharacterCodingException e) {
              e.printStackTrace();
          }
  
          return ret;
      }
docs: Convert a filename from Java´s native UTF-16 to US-ASCII character encoding.
  
  @param fileName The UTF-16 filename string.
  @return US-ASCII encoded string for the OS.