P
P
Printip2016-08-03 15:06:12
linux
Printip, 2016-08-03 15:06:12

How to convert large text file to utf 8?

There are 40 gigs of a text file (was obtained by parsing sites). Naturally, in the encoding file there is a wagon and a bogie. Can you please tell me how to convert all this to utf 8?
PS There are a lot of different encodings in the file.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan, 2016-08-03
@LiguidCool

The correct answer is that it was necessary to convert when parsing.

I
Ivan Koryukov, 2016-08-03
@MadridianFox

I doubt that there is a way to convert a file to one encoding when different parts of it have different encodings.
And in general, why did you need to put everything in one file?
Wouldn't it be easier to write the received data to the database, a 40GB file...

A
azsx, 2016-08-03
@azsx

the enconv command had to be used when parsing individual files.

A
abcd0x00, 2016-08-04
@abcd0x00

It is necessary to split the file back, determine the encoding in each piece, re-encode it into a common encoding, and then connect the re-encoded back.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question