From: Ian S. <ian...@st...> - 2009-09-11 11:06:17
|
I'm not a big fan of your proposal. I much prefer the Unix approach of using setting the locale to UTF-8, passing UTF-8 char* filenames, and letting the OS/CRT handle the conversion. On the other hand this "duplicate the API" approach (e.g function(char *) to function(wchar_t *) ) is exactly what the C and C++ standards body have chosen to implement. So we should probably be doing the same. I'd suggest going ahead and committing your code. If you have time, it would be useful to duplicate the tests also. Ian. Gehua Yang wrote: > 4. So I decided to implement "wide char extenstion" in vil and vul in my > local VXL copy. These extension functions are available in the attached > header files for anyone who are interested. The implementation is about 90% > copy and paste from the original implementation. > > We can also make this extension optional by introducing a macro such as > VXL_USE_WIN_WCHAR_EXTENSION > > While these extension functions work as intended, they do post some burdens, > in particular, code modification and code testing. In other words, any > modification or test cases have to be repeated twice. > > > 5. If we do not take the extension approach, but convert a filename > *everywhere* that VXL calls the standard library, I feel it may be too much > intimidating a task. > |