Hi all,

I have problems with apr_dir_open (WIN32-Version) when there is an 'Umlaut' (e.g. ASCII 196) within the path.
utf8_to_unicode_path returns APR_EINVAL.

As i have replaced the code of utf8_to_unicode_path() and unicode_to_utf8_path() as follows,

apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen, const char* srcstr)
{
        memset(retstr,0,retlen);
        if(!MultiByteToWideChar(CP_ACP,0,srcstr,strlen(srcstr),retstr,retlen))
                return apr_get_os_error();
        return APR_SUCCESS;
}

and

apr_status_t unicode_to_utf8_path(char* retstr, apr_size_t retlen, const apr_wchar_t* srcstr)
{
        memset(retstr,0,retlen);
        if(!WideCharToMultiByte(CP_ACP,0,srcstr,wcslen(srcstr),retstr,retlen,NULL,NULL))
                return apr_get_os_error();
        return APR_SUCCESS;
}

it worked.

Any ideas ?

Marcel Mann, d&b audiotechnik AG
Eugen-Adolff-Str. 134, 71522 Backnang
Tel. +49-7191-9669-219