private function translate_uri($uri) {
        // remove all html entities...
        $native_path = html_entity_decode($uri);
        $parts = explode('/', $native_path);
        for ($i = 0; $i < count($parts); $i++) {
            // check if part is allready utf8
            if (iconv('UTF-8', 'UTF-8', $parts[$i]) == $parts[$i]) {
                $parts[$i] = rawurlencode($parts[$i]);
            } else {
                $parts[$i] = rawurlencode(utf8_encode($parts[$i]));
            }
        }
        return implode('/', $parts);
    }