how to search in files text that is one-byte encoding? (enc. that's not unicode)

Asked by dinar qurbanov

how to search in files text that is one-byte encoding? places - search for files searches only utf-8 text.

( http://ubuntuforums.org/showthread.php?t=1564911 )

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
dinar qurbanov (qdinar) said :
#1
Revision history for this message
Wim (launchpad-xs4all) said :
#2

Q.Dinar,

perhaps a hint for you is to open a terminal window, go to the directory containing the text-files, and search for the text:

<Applications>,... <Accesoires>,... <Terminal>,...

   cd YourDirectoryNameHere

(e.g. cd Documents/Textfiles )

  grep TextYouWantToFind *.txt

(e.g. grep Wednesday *.txt )

  grep --help

gives you more explanation.
You can close the Terminal-window either by the key-combination Ctrl-D or by giving the command:

   exit

Revision history for this message
dinar qurbanov (qdinar) said :
#3

thank you.
i have tried it, but do not know yet how can i search one-byte encoded text.
for example:
grep -r \xc3\xeb\xe0\xe2\xed\xe0 /path/to/directory
does not work, intended to find files with text "Главна",
i have tried also
grep -r ������������ /path/to/directory
it also does not work, this is for "фактического" , and
grep -r фактического /path/to/directory
also does not work, and
grep -r Âàêàíñèè /path/to/directory
also does not work, this is for "Вакансии".

Revision history for this message
Wim (launchpad-xs4all) said :
#4

I keep trying, though i have no experience with other character sets...

1. try using grep with the text between " " , so
   grep -r "Âàêàíñèè" /path/to/directory

2. check if your language files of Ubuntu are complete:

<Applications>,... <System>,... <Language_support>,...

scroll to your language and (re-) checkmark the correct place; then choose <Apply>,... and when ready: <OK>

3. look whether you have your OpenOffice installed in the correct language:
   start Synaptic-Package_Manager and check:

<Applications>,... <System>,... <Synaptic-Package_Manager>,...

On the right side look for OpenOffice, and scroll down to see if all your language files are installed.

Revision history for this message
dinar qurbanov (qdinar) said :
#5

i think you are collecting launchpad karma

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.