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 167137 - I18N : [regression] search does not work if a multibyte exists at 4096th bytes
Summary: I18N : [regression] search does not work if a multibyte exists at 4096th bytes
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Victor Vasilyev
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2009-06-16 02:27 UTC by Masaki Katakai
Modified: 2009-07-16 16:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (11.15 KB, application/x-compressed)
2009-06-16 02:28 UTC, Masaki Katakai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2009-06-16 02:27:06 UTC
NetBeans IDE 6.7 RC3 (Build 200906142201)
Java: 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 1.6.0_07-b06-57
Mac OS X 10.5.7; SJIS; ja_JP (nb)

I got this feedback from Japanese community.

I'll attach the sample project using UTF-8 as project encoding.
Try to search e.g. "main" in the project. It should find strings
from both Main.java and Main1.java. However, it fails for Main.java.

The difference is, in Main.java, 4096th character in line 38 is Japanese.

Main1.java:
 * aaaaaaaaaaaaaaaaaaaab*/

Main.java:
 * aaaaaaaaaaaaaaaaaaaaあ*/

It looks a regression. It does not happen on 6.5.1.

I understand many developers are using multibytes in their programs.
This basic functionality should not be broken for 6.7 FCS. Please evaluate.
Comment 1 Masaki Katakai 2009-06-16 02:28:57 UTC
Created attachment 83607 [details]
sample project
Comment 2 Andrey Yamkovoy 2009-06-18 14:40:49 UTC
Fixed in the trunk by rejection of using FileEncodingQuery.ProxyCharset.ProxyDecoder which uses buffer of 4096 bytes to
decode. Now we are decoding whole file at once without using any buffers, so no situations with part of the multibyte
character should appears.

Comment 3 Quality Engineering 2009-06-19 20:24:06 UTC
Integrated into 'main-golden', will be available in build *200906191401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a6f22d4e6827
User: Andrey Yamkovoy <kaktus@netbeans.org>
Log: Fix for #167137 - I18N : [regression] search does not work if a multibyte exists at 4096th bytes
Comment 4 Masaki Katakai 2009-06-20 10:05:44 UTC
Thank you! It's great!

I've verified it on NetBeans IDE Dev (Build 200906191401).
Comment 5 pgebauer 2009-07-02 11:44:43 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/3d770d561ec1
Comment 6 pribyl 2009-07-16 16:30:05 UTC
Product Version: NetBeans IDE 6.7.1 RC (Build 200907150227)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

Verified in 6.7.1 RC

Search results now contains both - Main and Main1. Among others :)