This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Re: What is detect_conflict good for?
Ulrich Drepper <drepper@cygnus.com> writes:
|> Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> writes:
|>
|> > The function detect_conflict contributes more than 35% (!) to the runtime
|> > of the command "LC_CTYPE=de_DE df .". This is not acceptable. Do we
|> > really need it?
|>
|> The function is necessary for the hierachical gconv-modules files.
|> Users can have their own directory with modules. Without such a
|> complex detection of conflicts we have problems during the lookup as
|> has been shown in the change of the NF_Z_62-010_1973 charset change.
Ok. But there is a different problem related to this: scanf/printf use
mbtowc to convert the decimal character to wchar_t, and mbtowc uses the
LC_CTYPE locale to determine the mapping. But this may specify a
different charset as the LC_NUMERIC locale. Shouldn't the characters in
the locale information be stored in UTF-8 so that it can be converted
independent of the LC_CTYPE locale? That would also remove the need for
the expensive mbtowc operation.
Andreas.
--
Andreas Schwab "And now for something
schwab@issan.cs.uni-dortmund.de completely different"
schwab@gnu.org