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 97878

Summary: Use FileEncodingQuery
Product: utilities Reporter: Tomas Zezula <tzezula>
Component: SearchAssignee: Marian Petras <mpetras>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 42638    
Bug Blocks: 71197, 97848    

Description Tomas Zezula 2007-03-14 17:20:42 UTC
The search should use the FileEncodingQuery to read the files in correct encoding.
It should do something like:

final Charset c =
FileEncodingQuery.getEncoding(this.getDataObject().getPrimaryFile());
final Reader r = new InputStreamReader (primaryFile.getInputStream(), c);
try {
    search (r);
} finally {
    r.close();
}
Comment 1 Marian Petras 2007-03-23 14:40:24 UTC
Already done.

See issue #71197 ("Wrong encoding for Find & Search") for details.
Comment 2 Ken Frank 2007-10-15 22:43:47 UTC
Marian,

I think it can be verified - here are my steps - let me know if it makes sense as regards this fix:

- have projects that use both utf-8 and euc-jp project encoding.
- find using mbyte characters in each - both projects are found since in this case I think the same characters
are valid in euc-jp and utf-8; perhaps some chars not valid in euc that are valid in utf-8 are needed

- have a previous j2se project in euc-jp that was changed to iso-8859-1 encoding - in this case the characters
are not found now, which makes sense since those characters are not part of the iso-8859-1 charset.

ken.frank@sun.com

Comment 3 Marian Petras 2007-10-16 13:03:29 UTC
Ken, your check makes sense. Thank you.
Comment 4 Ken Frank 2007-10-20 17:30:32 UTC
verified.