RE: Comctl32.StrStrIW implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Dmitry Timoshkov [mailto:dmitry@baikal.ru]
> Sent: 12 December 2002 07:23
> To: Robert Shearman
> Cc: wine-devel@winehq.com
> Subject: Re: Comctl32.StrStrIW implementation
>
>
> "Robert Shearman" <R.J.Shearman@warwick.ac.uk> wrote:
>
> > StrStrIW is used by native Regedit when searching the registry.
> This patch
> > enables this function of Regedit to work.
> >
> > ChangeLog:
> > - Implement StrStrIW (find a string inside a string)
>
> > + first = towlower (*lpStr2);
> > + while (len1 >= len2) {
> > + if (towlower(*lpStr1) == first) {
>
> It almost always is a bad idea to use unicode or locale dependant
> functions
> from a system libc (isalpha() in your other patch). It could
> sometimes produce
> bad side effects due to different unicode implementations and the
> fact that
> Wine's default ANSI code page often is not the same as a one used
> by an underlying
> system. The best way to avoid discrepancies is to use Win32 APIs to deal
> with locale sensitive data. Other way to avoid use of the libc locale
> dependant functions is to delegate all the work to unicode version of
> the API and leaving to ANSI version only simple work of converting strings
> to unicode and adopting the returned data if necessary.

Good point. Here's a revised patch.

Attachment: comctl32.diff
Description: Binary data


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux