On Thu, 2008-09-11 at 11:25 -0700, Pawel Veselov wrote: > Hi, > > I was looking at the libcwd... There is a XCEGetCurrentDirectoryA() > function. It picks the current directory, that is stored in wide > chars, determines its length (in wide chars), and then converts wide > chars to multibyte. Then the wide char length is used as a terminator > for the length of the multibyte string. Since it's using CP_ACP > encoding, I guess the wide char length will translate into correct > character length, but if there is any character that doesn't fit into > ASCII table, you kinda boned... > > So, umm, what's the general policy for handling international > characters anywhere (within the confinements of cegcc)? I guess I'm > really asking about what it should be, rather than what it is now.
The internals are as you describe but the external interface to libcwd is unix-like, meaning single byte characters for file names. You could probably make it more foolproof, but doesn't this mean you're eventually going to be scr*wed if you're using this on directories with names that don't fit in ASCII ? Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel