Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ag cannot find accent letters #1062

Open
xc1427 opened this issue Feb 24, 2017 · 3 comments
Open

ag cannot find accent letters #1062

xc1427 opened this issue Feb 24, 2017 · 3 comments

Comments

@xc1427
Copy link

xc1427 commented Feb 24, 2017

Version: windows port 0.29.1-1641 (built on 2015-07-04)
System: windows 7 pro, language français
Issue: Ag cannot find french accent letter, such as ô, é, è, ç, à, etc.

@JFLarvoire
Copy link
Contributor

JFLarvoire commented Mar 4, 2017

Bonjour,
Having the same problem, I've just done another port of ag for Windows that can find non-ASCII characters... But so far only in text files encoded as UTF-8.
Also, it will find files that have non-ASCII characters in their pathname.
The sources are there: https://github.com/JFLarvoire/the_silver_searcher
If you don't have Visual C++ for rebuilding it, I've uploaded pre-built versions in: https://github.com/JFLarvoire/the_silver_searcher/releases/download/1.0.2-Windows/ag.zip
Eventually, I plan to add a dynamic detection of the encoding (ANSI/UTF-8/Unicode), to allow finding non-ASCII characters in any kind of text file.
Jean-François

@skrattaren
Copy link

This should be an issue for Windows port author. If it was ag issue, it has been fixed already:

 % ag ô /tmp/ag.txt  
1:ô, é, è, ç, à

(Linux amd64)

@JFLarvoire
Copy link
Contributor

Yes, this was indeed a problem in previous Windows ports, not in Unix builds.
I've released a few days ago a new version 2.0.0 for Windows with full support for this at last:
https://github.com/JFLarvoire/the_silver_searcher/releases
As proposed in my previous post above, it dynamically detects the encoding, and can search both in files encoded in UTF-8 and in the Windows System code Page (CP 1252 for west-european versions of Windows).
And whatever the file encoding, and whatever the current console code page, the strings found will be displayed correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants