Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to solve messy code?

By
hxh_sportsman
on 4/24/13, 5:54 AM 1,437 views

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!

0
David Myers
On 10/26/14, 4:18 PM

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

0
Antanas
On 4/24/13, 6:25 AM

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?

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.

hxh_sportsman
on 4/24/13, 7:09 AM
0

Ben Bernard

--Ben Bernard--
1083
| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 10/26/14, 10:11 PM

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.
 

0
hxh_sportsman
On 4/24/13, 7:07 AM

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 4/24/13, 5:54 AM
Seen: 1437 times
Last updated: 3/16/15, 8:10 AM