User forums > Help

Can't find in files in Linux with nonstandard file extensions... bug perhaps?

(1/2) > >>

rickg22:
Guys, I've noticed something recently. I'm using CB 8.02 (and later tested it with SVN 4967). Find in files doesn't work with non-cpp files (like .php or .shtml files). No matter what I do, it only finds text in the currently open files.

The files i'm currently working on are under /var/www/html, but the problem also happens if the project's under /home.

Can anyone confirm if this happens too? Thanks!

P.S. I renamed the files to .cpp and it appears that not even with that cb can find in files. Did I hit a bug, or it's some misconfiguration in my box?

Edit: This is some of what appeared in the search log.
==========| |=== "css" ===|
| |not found in 15 files|
==========| |=== "href" ===|
| |not found in 15 files|

rickg22:
It seems the HTML code confuses the search. I'll have to run cb with the --debug-log option and add some debug lines to see what's doing wrong...

I'll report back when I get more results.

Jenna:
I just tried with *.php, *.html and *.css.
On my box it works as expected if the user rights are set coorrectly. If there are no read-rights it says "no files to search".

debian sid/experimental, wxWidgets 2.8.7, svn4967, default-encoding is utf-8

rickg22:
The files i'm using are saved in ISO-8859-1. I'll try - WHOA!!! YOU DID IT!!! Thanks a lot, jens! I saved the file as UTF-8 and the search was performed correctly!

So the search only fails if the files are saved as ISO-8859-1 (or maybe just not UTF-8).

Also, I just found out something very interesting.


--- Quote ---The 18 March 2008 build (4966) is out.
* pumped wxScintilla to v1.71.1 (latest version available) which includes Scintilla v1.62

--- End quote ---

And in the Scintilla history (  http://scintilla.sourceforge.net/ScintillaHistory.html ) :


--- Quote --- Release 1.63
* Searching bugs fixed.

--- End quote ---

It's interesting to notice that Scintilla is currently on version 1.76!!!  :shock:
Perhaps that's the problem. We're using an outdated and buggy scintilla build :(

Anyway, I'm not even sure if this happens all the time, but I'm able to replicate the success (non-bug) if i save as UTF-8. If i save to ISO-8859-1, close CB and reopen, the string in question isn't found. (Perhaps this is why the bug doesn't appear in Windows - i.e. UTF-8/unicode issues?)

I'm thinking that when opening files normally in CB, some encoding conversion is performed, and that isn't the case when finding in files. Can anyone confirm is this is the case?


Just to confirm, jens... in C::B, in editor, change the default encoding to ISO-8859-1. Edit a file, save, close, close CB, reopen it, and search for a string using find-in-files. Is the string found in the new file?

Jenna:
It happens for me if I have files encoded in iso8859-1 that contain special chars (like ä, â, ñ or è in comments for example).

It doesn't matter if default-encoding is iso8859-1 or utf-8, the files are not found, if they are encoded in iso8859-1.

If they are encoded in utf-8 search works as expected.

Navigation

[0] Message Index

[#] Next page

Go to full version