From Unicode to paths

YAP x112358 at gmail.com
Tue May 1 13:45:43 PDT 2007


I have always been a bit confused when it comes to unicode but at last
decided to use it throughout my programs. Anyway sometimes you has to
call lower level functions that only accept char *

If you represent a path for example as a wxString at the higher levels
of the program what is the correct way to convert it. For example for
the Linux dlopen is this valid

    char szPath[PATH_MAX];

    strcpy( szPath, strPath.ToAscii() );
    if ( NULL == ( m_hinst = dlopen( szPath, RTLD_LAZY ) ) ) {
       return false;
   }

The docs recommend using wxString::mb_str  will the use of this method
allow for national characters in path also for low level functions as
above.

Any help, hints appreciated.

Cheers
/Ake

-- 
 ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavagen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 0533 146
Company home: http://www.dofscandinavia.com
Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.dofscandinavia.com/akhe
Automated home: http://www.vscp.org




More information about the wx-users mailing list