Bug 110155 - File Search & Utf-8 BOM Issue
Summary: File Search & Utf-8 BOM Issue
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.1.1   Edit
Assignee: Martin Aeschlimann CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-21 07:24 EDT by Thomas König CLA Friend
Modified: 2005-09-26 06:19 EDT (History)
1 user (show)

See Also:


Attachments
proposed patch (2.76 KB, patch)
2005-09-21 12:16 EDT, Martin Aeschlimann CLA Friend
no flags Details | Diff
improved patch (3.01 KB, patch)
2005-09-22 04:26 EDT, Martin Aeschlimann CLA Friend
no flags Details | Diff
Even better patch (2.97 KB, patch)
2005-09-22 06:30 EDT, Dani Megert CLA Friend
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas König CLA Friend 2005-09-21 07:24:16 EDT
There is a Bug in the File Search if you have Utf-8 Files with BOM. It finds the
correct conntent but marks it with an offset of 1 characters.
If you search for "Test" for example he finds it but marks "est ".
So if you do a Replace with "test" for example you get "Ttest".
Comment 1 Martin Aeschlimann CLA Friend 2005-09-21 12:14:32 EDT
The problem is a bug in the JDK
http://developer.java.sun.com/developer/bugParade/bugs/4508058.html

We need to add code to work around that.
Comment 2 Martin Aeschlimann CLA Friend 2005-09-21 12:16:00 EDT
Created attachment 27342 [details]
proposed patch
Comment 3 Martin Aeschlimann CLA Friend 2005-09-21 12:16:41 EDT
Should fix for 3.1.1. Dani can you review the patch?
Comment 4 Martin Aeschlimann CLA Friend 2005-09-22 04:26:17 EDT
Created attachment 27377 [details]
improved patch

patch adds better error handling, to make sure that an opened stream is really
closed.
Comment 5 Dani Megert CLA Friend 2005-09-22 06:30:30 EDT
Created attachment 27381 [details]
Even better patch
Comment 6 Dani Megert CLA Friend 2005-09-22 06:31:01 EDT
Verified that the patch fixes the problem using I20050921-2000.
Comment 7 Martin Aeschlimann CLA Friend 2005-09-22 06:44:03 EDT
last patch is ok for me. Released in 3.1.1
Comment 8 Dani Megert CLA Friend 2005-09-22 06:52:20 EDT
I've comitted the patch to HEAD.
Comment 9 Martin Aeschlimann CLA Friend 2005-09-26 06:18:30 EDT
fixed in 3.1.1
Comment 10 Martin Aeschlimann CLA Friend 2005-09-26 06:19:36 EDT
verified fix is in M20050923-1430