Quantcast
Channel: User Dominique - Super User
Viewing all articles
Browse latest Browse all 176

How to grep on accented vowels? [duplicate]

$
0
0

I have a logfile, written in French, containing the following information:

Nouvelles données [Status : 32

I was looking for all possible values of the mentioned status, but I didn't find anything:

grep -o "Nouvelles donn" logs_Trace_service.txt

Result:

Nouvelles donn (plenty of them)

But:

grep "Nouvelles donn" logs_Trace_service.txt (not `grep -o`)Binary file logs_Trace_service.txt matches

For your information: grep is an alias: alias grep='grep -aI --color=auto' and the file has "normal" encoding:

file logs_Trace_service.txtlogs_Trace_service.txt: ISO-8859 text, with CRLF line terminators

If I ask to show what the file looks like:

head -n 3 logs_Trace_service.txt... Nouvelles donnes [Status : 32 - Localisation : 312]

Apparently, the accent égu is not even shown in the head result.

I'm working on a WSL on Windows 10, the result of cat /etc/os-release is:

NAME="Ubuntu"VERSION="20.04.2 LTS (Focal Fossa)"

The version of grep is:

grep --versiongrep (GNU grep) 3.4

Anybody have an idea?


Viewing all articles
Browse latest Browse all 176

Trending Articles