Brock Pytlik wrote:
> Roland Mainz wrote:
> > Brock Pytlik wrote:
> >> http://cr.opensolaris.org/~bpytlik/ips-2672-v1/
> >> has the patch.
> >>
> >> It makes case-insensitive search both possible and the default behavior.
> >> For local search, there's an option ( -I though I'm definitely open to
> >> alternatives -c?) that allows for case sensitive search. For protocol
> >> reasons, remote search is only case insensitive. There is a small (IMO)
> >> performance hit for both local and remote search. Case sensitive search
> >> still takes the same amount of time: .5-.6 seconds but case-insensitive
> >> search takes .7-.8 seconds.
> >>
> >> Remote search takes the biggest hit, going from .1-.2 seconds to .6-.7
> >> seconds.
> >
> > Just curious: What does "remote search" mean in this case ?
> > Case-insenstive matching depends on the locale and AFAIK would require
> > to pass the the locale token (e.g. LANG, LC_*, LC_ALL) to the remote
> > site...
>
> As Shawn said, remote search means searching the repositories of the
> authorities you have set. Since right now, we do no language specific
> adaptation, this would be an RFE.

Erm... this isn't an RFE - this is AFAIK a _bug_ (that's why I've CC:ed
[EMAIL PROTECTED] to get a verification and help) and right
now the code only works by accident. If client and server run in
different locales you may end-up in a situation where the
case-insensitive matching doesn't work as expected.

> We use Python's .upper and .lower
> functions, which eventually call down to the C library functions tolower
> and toupper.

Erm... does it call |toupper()| or |towupper()| ? The first form is
AFAIK for single-byte locales only while the 2nd form works on |wchar_t|
(which should IMO be preferred).

> Those use the locale for the program to determine the
> mapping between cases. If they don't recognize the character, they
> simply pass over it. Luckily, there is a solution, we can use Python's
> locale module to adapt out locale, but it's not thread safe, so making
> it work correctly in the current depot would not be trivial. Of course,
> we could roll our own lower and upper methods that didn't rely on a
> global locale and was thread safe, but that's also outside the scope of
> this bug. Please file a RFE for this.

As said above this isn't a RFE since you can't assume that an uppercase
character in one locale has the same lowercase counterpart in a
different locale.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to