Search in text file containing cyrillic
by illuminaris - Friday November 17, 2023 at 11:49 AM
#1
Hi All

I am trying to figure out, how to search in a textfile containing cyrillic letters in Linux terminal, which uses an english char set.

Using
Cat BreachedDataUkraine53MCitizenshipDatabase.txt
Produces
1448700758      ������  6656    �����˲� 21      ����������      9      1 


using
LANG=ru_RU.CP1251 luit cat BreachedDataUkraine53MCitizenshipDatabase.txt
Produces
КАКОТКІН        207249  РОМАН

But if i try to grep something like
LANG=ru_RU.CP1251 luit cat BreachedDataUkraine53MCitizenshipDatabase.txt | grep МЕРКУЛЕНКО
It just prints the whole file

strings BreachedDataUkraine53MCitizenshipDatabase.txt | grep 1990
Only shows numbers

Any help are appreciated Smile
Reply
#2
try grep "string" /path/to/your/folder with txt file
Reply
#3
https://unix.stackexchange.com/a/40573

This stackexchange answer should solve your problem I think.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Building a subnet. Inexorable_Baer 1 179 Jan 11, 2026, 02:20 AM
Last Post: linbobo668899
  Linux from Scratch kirby 7 4,861 Jan 06, 2026, 05:33 PM
Last Post: swisstiger
  your linux distro dundrondo 22 4,634 Apr 10, 2025, 11:36 AM
Last Post: fogplank
  Virtualbox 7.1.4 in Ubuntu 24.10 Blinkers 9 2,119 Apr 01, 2025, 08:11 PM
Last Post: capseco
  KDE or Gnome jahy 16 10,204 Mar 26, 2025, 10:00 PM
Last Post: capseco

Forum Jump:


 Users browsing this forum: 1 Guest(s)