3
I have a file. 55GB sql and needed to run line by line, but as I cannot load a file of this size, I divided into 543 100MB files named as Imagens<NumeroSequencial>.sql
.
So I made a code that reads the files 1 to 1 and extracts the lines in a list, after that runs the commands line by line.
The third party program that splits the files extracts the files with encoding UTF-16 BE
that in c# is Unicode. When I read files with the even number at the end of the name and debug the following code, I get Chinese characters, but when files with odd number come all normal, the problem is that the odd number have the same encoding as the even number ones, they came from msm software of the same division.
string s_unicode = File.ReadAllText(path,Encoding.Unicode);
//retorno > 猀漀挀挀攀爀
What could possibly be going on? I’ve tried using UTF-8 but ai returns me a lot of \0\0\0\0\0\0
Follow the file for testing at that link
Marcelo, I have a nice experience with programming, but I couldn’t understand how to apply it in practice, it’s too complex for you to give me an example?
– Leonardo Bonetti
It must have a character 0 at the very beginning of the file. Just remove it.
– Marcelo Shiniti Uchimura