Page 1 of 1

Fail in finding a pattern

Posted: Mon Feb 01, 2010 6:51 am
by Halley
Hi, Eran & all

I would like to know how CodeLite implement the function "Search | Find In Files".

I use CL in windows XP platform. It fails at time in finding a pattern.
The project directory hierarchy is like this:
src/a.c
src/b.c
sub/suba.c
sub/subb.c

When using "Find In Files">"Look in: Current File's Project", the result shows that the pattern are matched in files `b.c', `suba.c', `subb.c', but not `a.c'. Actually, I copy the pattern from file `a.c' and indeed I want to see all occurrences of the pattern in file `a.c'.

The file `a.c' has non-ascii characters '\223' and '\224'. I donot know how they are inserted in an ascii source file. They do not exist in linux platform of the same file, at least I can't see them in emacs/vim/less. (Yes, I use version control system to sync code into linux and windows.)

I create a new project, add new blank file `newfile.c', copy the content of `a.c' and paste into `newfile.c', and try "Find In Files" again. This time, it works fine.

How to trace this issue in order to provide more infomation or to debug by myself?
Can you give some advices?
Thanks!

Re: Fail in finding a pattern

Posted: Mon Feb 01, 2010 10:05 am
by eranif
Try this:

- Change the default encoding into ISO-8859-1 (from the menu: settings -> global editor preferences -> misc)
- In the 'Find In Files' dialog, tick the option 'Use the editor's font encoding'

Try to search again.
Does it help?

Eran

Re: Fail in finding a pattern

Posted: Mon Feb 01, 2010 12:42 pm
by Halley
It works fine.
HAHA :lol:

Thanks a lot!

Re: Fail in finding a pattern

Posted: Wed Mar 17, 2010 6:54 pm
by garfield
I really hope this issue finds a solution, because its current state is totally unacceptable. It adds this bitter taste of "open source apps can only be used by geeks".
CL should do the right thing...much like every other IDE.

In my own eyes - its still a bug.

MihailNaydenov

Re: Fail in finding a pattern

Posted: Thu Mar 25, 2010 4:37 am
by eranif
garfield wrote:I really hope this issue finds a solution, because its current state is totally unacceptable. It adds this bitter taste of "open source apps can only be used by geeks".
CL should do the right thing...much like every other IDE.

In my own eyes - its still a bug.
In trunk version of codelite, this issue is now fixed using the following method:

- The Find In Files now has a drop-down to select the encoding to use while searching files
- The Find In files encoding is NOT related to the editor's encoding.
- The default encoding for the Find In Files is now set to ISO-8859-1

Eran