Fail in finding a pattern

General questions regarding the usage of CodeLite
Halley
CodeLite Enthusiast
Posts: 14
Joined: Wed Feb 18, 2009 11:50 am
Contact:

Fail in finding a pattern

Post 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!
Last edited by Halley on Fri Apr 02, 2010 6:36 am, edited 1 time in total.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Fail in finding a pattern

Post 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
Make sure you have read the HOW TO POST thread
Halley
CodeLite Enthusiast
Posts: 14
Joined: Wed Feb 18, 2009 11:50 am
Contact:

Re: Fail in finding a pattern

Post by Halley »

It works fine.
HAHA :lol:

Thanks a lot!
garfield
CodeLite Enthusiast
Posts: 20
Joined: Fri Feb 26, 2010 7:13 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Fail in finding a pattern

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Fail in finding a pattern

Post 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
Make sure you have read the HOW TO POST thread
Post Reply