Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0009302Openbravo ERP01. General setuppublic2009-06-02 18:262009-06-20 00:00
networkb 
alostale 
immediatemajoralways
closedfixed 
10
2.40MP3 
pi 
Core
No
0009302: The xml files created when a language is exported are not generated with utf-8 enconding when using window
The xml files created when a language is exported are not generated with utf-8 enconding when using window.
This causes an error if you want to use this files in another process, for example
with xml2po utility
-Go to general setup>Import/Export languages and export a language.
-Use the xml files generated at /path/AppsOpenbravo/attachments/lang/folder_of_the_language in another process for example in the xml2po utility

-If you use the files in the xml2po utility with the following order you get an error:
ant runXML2PO -DinpFold=/pathAppsOpenbravo/attachments/lang/es_ES -DoutFold=/path/output

-The error is the following:
org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.

Modify the src/org/openbravo/erpCommon/ad_forms/Translation.java file
replacing the following line

OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream (out));

with this other.

OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream (out), "UTF8");

It is because you have to indicate that you want to use utf-8 encoding.
No tags attached.
depends on backport 0009307 closed alostale The xml files created when a language is exported are not generated with utf-8 enconding when using window 
related to defect 0009486 closed alostale The translation are not exported to xml files with UTF-8 encoding 
related to defect 0009602 closed marvintm The xml files generated when exporting the database are not exported as utf-8 in windows 
Issue History
2009-06-02 18:26networkbNew Issue
2009-06-02 18:26networkbAssigned To => rafaroda
2009-06-03 08:34rafarodaNote Added: 0016900
2009-06-03 08:34rafarodaAssigned Torafaroda => alostale
2009-06-03 08:35rafarodaStatusnew => scheduled
2009-06-03 08:35rafarodafix_in_branch => pi
2009-06-04 15:18hgbotCheckin
2009-06-04 15:18hgbotNote Added: 0016951
2009-06-04 15:18hgbotStatusscheduled => resolved
2009-06-04 15:18hgbotResolutionopen => fixed
2009-06-04 15:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9f3da007ec83ea769b47ecd33ed9166433abd1f9 [^]
2009-06-16 10:18rafarodaRelationship addedrelated to 0009486
2009-06-19 12:48sureshbabuStatusresolved => closed
2009-06-19 12:48sureshbabuNote Added: 0017473
2009-06-19 12:48sureshbabuFixed in Version => pi
2009-06-20 00:00anonymoussf_bug_id0 => 2809272
2009-06-24 09:51rafarodaRelationship addedrelated to 0009602

Notes
(0016900)
rafaroda   
2009-06-03 08:34   
Asier, please review the proposed solution. Thanks.
(0016951)
hgbot   
2009-06-04 15:18   
Repository: erp/devel/pi
Changeset: 9f3da007ec83ea769b47ecd33ed9166433abd1f9
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 04 15:18:28 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9f3da007ec83ea769b47ecd33ed9166433abd1f9 [^]

fixed bug 0009302: The xml files created when a language is exported are not generated with utf-8 enconding when using window

---
M src/org/openbravo/erpCommon/ad_forms/Translation.java
---
(0017473)
sureshbabu   
2009-06-19 12:48   
Checked it's changing in UTF-8 encoding