protected static File getFileFromRequest(String shareDirectory,
			String requestedFileName) {
		String fn = null;
		File f = null;

		// 2. use utf8
		fn = URL.decode(requestedFileName, "UTF-8");
		f = new File(shareDirectory, fn);
		if ((f != null) && f.exists()) {
			return f;
		}

		// 3. use iso latin 1
		fn = URL.decode(requestedFileName, "ISO-8859-1");
		f = new File(shareDirectory, fn);
		if ((f != null) && f.exists()) {
			return f;
		}

		// 4. try everything (does this need too much cpu? i dont hope so)
		Set<String> cks = SharedEntity.charsetMap.keySet();
		Iterator<String> cki = cks.iterator();
		while (cki.hasNext()) {
			String ck = cki.next();

			try {
				f = new File(shareDirectory, de.guruz.p300.utils.URL.decode(fn,
						ck));
			} catch (Exception e) {
				f = null;
			}

			if ((f != null) && f.exists()) {
				return f;
			}
		}

		return null;
	}