Mail Archives: djgpp/2000/09/23/18:14:57

From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: dcasale AT my-deja DOT com
Cc: djgpp AT delorie DOT com
In-reply-to: <8qb5ke$g7c$> (
Subject: Re: _fixpath bug?
References: <8q8ugf$t6d$1 AT nnrp1 DOT deja DOT com> <8qa0im$e31$1 AT antares DOT lu DOT erisoft DOT se> <8qasct$427$1 AT nnrp1 DOT deja DOT com> <39C901A4 DOT 6CAF5846 AT softhome DOT net> <8qb5ke$g7c$1 AT nnrp1 DOT deja DOT com>
Message-Id: <>
Date: Sat, 23 Sep 2000 18:14:20 -0400 (EDT)
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: dcasale AT my-deja DOT com
> Newsgroups: comp.os.msdos.djgpp
> Date: Wed, 20 Sep 2000 20:11:13 GMT
> >
> > While writing 3-to-5 lines function to do that does not
> > seem very hard, but why do you want to do it in the first
> > place? All library functions understand both cases.
> >
> > Laurynas
> Because my code parses pathnames manually, since it requires proper
> multibyte handling of pathnames containing characters with a backslash
> as the second byte.  I don't think dirname and basename are multibyte-
> enabled, at least not from the code snippet I was able to find in the
> gcc source.

DJGPP library does not support multibyte characters (except trivial
ones, which simply extend ASCII characters with null bytes).  However,
it does not support non-ASCII characters in file names at all.  So you
will have much more trouble with multibyte characters in filenames
down the road, than just backslashes in _fixpath.

If you are up to this, it will be probably easier to add UTF-8 support
to file-name- and ctype-related functions than hack around every
library function.  I'm quite sure the library will fight you back on
this one, since other functions also attach special meaning to slash
and backslash.

If you do decide to add UTF-8 to DJGPP, we will be delighted to accept
your patches.  Thanks in advance.

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019