Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
5334 Visualizzazioni

Hi, i have a question about export to csv file from OE system. my OS is windows 7. the character set of OS is GBK . now, i export to CSV file from OE system , the CSV file is UTF-8 encoding, it's different from OS's encoding, so appear garbled.

I want to change current OS encoding(GBK) to OE's file encoding(UTF-8), so achieve my purpose, but this implementation is difficult.

any good idea for me.

thank you!

Avatar
Abbandona
Autore Risposta migliore

Thank for antanas's infos I want to solve this issue once and for all. I want to not convert every time, when i export and import file I know change system encoding is better, but i don't know how to change it.

Avatar
Abbandona
Risposta migliore

Your problem most likely lies in what you are using to open the files.

You should be using a 'plain text editor' in the first instance. However I appreciate that excel may present a CSV in a more readable format.

Normally when you open the file you will likely be presented with a dialogue asking how to handle the file, in this you will have the option of setting the field separators, and encoding.

Your problem is going to arise in saving the file back to CSV, microsoft with try and second guess you, and will attempt to adjust the encoding, and field separators to something more modern (read wrong for Odoo).

In the first instance of using Odoo I was rather surprised that they used UTF-8, I'm more used to seeing one of the IS0-8859-X forms, but that is probably just me.

Your best bet may be to get a version of libre office or Open Office, the spreadsheets in them are more friendly to saving the file to the format that you started with.

I don't know if it exists in windows, but on Linux you can often set a specific encoding for specific file types.

 

David

Avatar
Abbandona
Risposta migliore

Try to use notepad++, it's a really powerfull text editor and can be a minimal IDE for your favorite programming language.

For you problem, it has nice Encoding converter and you can see what encoding of current loaded file in the status bar.
 

Avatar
Abbandona
Risposta migliore

Imho, changing system encoding could prove to be a better idea than changing OpenERPs'.

Or maybe changing encoding of the editor you use to view exported csv files would be enough?

Avatar
Abbandona
Autore

Thank for antanas's infos, I want to solve this issue once and for all. I want to not convert every time, when i export and import file. I know change system encoding is better, but i don't know how to change it.