This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 155292 - “Find in Projects” omits Upper/Lower case Cyrillic letters
Summary: “Find in Projects” omits Upper/Lower case Cyrillic letters
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Andrey Yamkovoy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-12 07:05 UTC by ale4349koc
Modified: 2009-02-19 23:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ale4349koc 2008-12-12 07:05:38 UTC
I use NetBeans IDE 6.5 (Build 200811100001). For example, we have next comments at any java class:
[code]
// This is a text for Latin letters search = Font222 and font222
// This is a text for Cyrillic letters search = Фонт222 и фонт222
[/code]  
When we try to search for “Font222”, we get back two matches lines: one for “Font222” and second for “font222”. When we
try to search for “Фонт222”, we get back just one match line, exactly for “Фонт222”. Similar situation is for the lower
case letter search. I think the same situation will be for other non-Latin letters.
Comment 1 Petr Dvorak 2008-12-12 09:18:36 UTC
What version of JDK (and what OS) do you use? (copy/paste info from Help>About here)

Might be a bug in JDK...
Comment 2 Petr Dvorak 2008-12-12 17:18:53 UTC
Here is the info (sent to my e-mail):

Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)
Comment 3 Marian Petras 2009-01-05 15:39:57 UTC
I think I know the cause of this bug.

In file BasicSearchCriteria.java there is a method compileSimpleTextPattern(). It contains the following lines:

            ...
            int flags = 0;
            if (!caseSensitive) {
                flags |= Pattern.CASE_INSENSITIVE;
            }
            ...

It should be

            ...
            int flags = 0;
            if (caseSensitive) {
                flags |= Pattern.UNICODE_CASE;
            } else {
                flags |= Pattern.CASE_INSENSITIVE;
            }
            ...
Comment 4 Andrey Yamkovoy 2009-01-11 13:06:46 UTC
Fixed in the trunk.
Comment 5 Quality Engineering 2009-01-12 05:00:51 UTC
Integrated into 'main-golden', will be available in build *200901120201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/eb9f9fb4c7b4
User: Andrey Yamkovoy <kaktus@netbeans.org>
Log: Fix for #155292 - ?Find in Projects? omits Upper/Lower case Cyrillic letters
Comment 6 kaa 2009-01-19 17:38:39 UTC
verified:

Product Version: NetBeans IDE Dev (Build 200901160201)
Java: 1.6.0_06; Java HotSpot(TM) Server VM 10.0-b22
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)