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 197483 - the search replace operation does not respect file charset codification when replacing on multiple files
Summary: the search replace operation does not respect file charset codification when ...
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: I18N
: 197181 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-06 12:28 UTC by lpanebr
Modified: 2011-05-23 08:43 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
files to allow problem reproduction (2.84 KB, application/zip)
2011-05-13 18:47 UTC, lpanebr
Details
printscreen of the problem (150.86 KB, image/png)
2011-05-13 18:47 UTC, lpanebr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lpanebr 2011-04-06 12:28:12 UTC
Product Version = NetBeans IDE 7.0 RC1 (Build 201103280000)
Operating System = Linux version 2.6.32-30-generic running on amd64
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) 64-Bit Server VM 19.1-b02
Comment 1 lpanebr 2011-04-25 12:04:30 UTC
Just reporting:

I installed the 7.0 official version an this bug still persists.
Comment 2 Jiri Rechtacek 2011-05-13 07:46:52 UTC
The reporter, could you attach your file/files here for reproduction the problem? It helps me to evaluate what's wrong. Thanks a lot
Comment 3 lpanebr 2011-05-13 18:47:14 UTC
Created attachment 108281 [details]
files to allow problem reproduction
Comment 4 lpanebr 2011-05-13 18:47:51 UTC
Created attachment 108282 [details]
printscreen of the problem
Comment 5 lpanebr 2011-05-13 18:48:29 UTC
Dear Jiri,

I have attached 
A) printscreen of the problem and also 
B) a zipped folder with two files in it that will allow you to follow the steps bellow to reproduce the problem:

1. unzip the folder to your filesystem
2. create a project in NB pointing to this folder and make sure you set the "Default Encoding" to ISO-8859-1.
3. Select the project on the projects pane.
4. Press Ctrl+Shift+H or select Edit > "Replace in Projects..." from the menu.
5. Fill "Link" on "Containing Text:", "Atalho" on "Replace With:" and "*.*" on the "File Name Patterns:"
6. Make sure you are searching on "Open Projects" or in the whole "folder" and hit the Find button.

Right there on the "Search Results", upon selecting a file you will see the problem in the "replace preview pane". If you do apply the replace ALL the files with get a replaced string will have their encoding changed and thus breaking the accented characters.

Note: a single file Replace operation does not present this problem. Only the multiple file Replace does.

Hope this helps.

Regards
Comment 6 Jiri Rechtacek 2011-05-16 10:00:30 UTC
Thanks for detail steps to reproduce the problem, now I'm able to reproduce it too.
Comment 7 lpanebr 2011-05-19 12:01:10 UTC
thanks for moving this forward. where is the Like button? ;-)
Comment 8 Jiri Rechtacek 2011-05-20 19:53:59 UTC
fixed in core-main/rev/df3186c69ae6

lpanebr, could you verify the fix on daily build containing this patch? (a link to daily build will come here soon). If the fix works, I port it to NB 7.0.1 release. Thanks
Comment 9 Quality Engineering 2011-05-21 08:48:47 UTC
Integrated into 'main-golden', will be available in build *201105210400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/df3186c69ae6
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #197483: the search replace operation does not respect file charset codification when replacing on multiple files
Comment 10 lpanebr 2011-05-22 00:37:52 UTC
I can confirm that this problem IS FIXED on the netbeans-trunk-nightly-201105210400-ml-php-linux.sh version.

Congratulations for working quickly! netbeans team rocks!

Look forward to see this merged into an official release.

thanks!
Comment 11 Jiri Rechtacek 2011-05-23 07:41:40 UTC
Thanks for verification, the patch has been ported to NB7.0.1 base - releases/rev/41347d9050dc
Comment 12 Jiri Rechtacek 2011-05-23 08:43:27 UTC
*** Bug 197181 has been marked as a duplicate of this bug. ***