Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007142Openbravo ERP00. Application dictionarypublic2009-01-26 18:422009-04-21 11:04
networkb 
iperdomo 
immediateminoralways
closedfixed 
5
2.40 
 
Core
No
0007142: The first time a report with special characteres is compiled, translation fails
If a static field in a report contains special characters, like ñ,ó,á...and is compiled (ant compile.development -Dtab=xx), the translation fails.
If you want to see the report, special character will be showed uncorrectly.
If you compile again the application (using the same sentence), translation is done properly but the problem persists.
1. Modify a report (for example RptC_OrderPO_Lines.jrxml). Add a static text like Descripción.
2. Compile it with iReports.
3. Copy the .jasper generated into erpReports folder.
4. Compile the application using: ant compile.development -Dtab=xx
5. Warning appears like this one: compile.translate:
     [java] 0 [main] WARN org.openbravo.translate.Translate - Couldn't translate: Descripci├│n.Result translated: Descripci├│n.Actual file: /org/openbravo/erpReports/RptC_OrderPO_Lines.jrxml

6. Restart Tomcat and go to Purchase Order.
7. Press "Printer" button.
8. The report shows an uncorrectly character (see the attached file)
No tags attached.
depends on backport 0007222 closed iperdomo The first time a report with special characteres is compiled, translation fails 
pdf RptC_OrderPO.jrxml-5.pdf (6,673) 2009-01-26 18:42
https://issues.openbravo.com/file_download.php?file_id=735&type=bug
pdf RptC_OrderPO.jrxml.pdf (6,845) 2009-01-26 19:33
https://issues.openbravo.com/file_download.php?file_id=736&type=bug
log compile.log (10,725) 2009-01-26 19:33
https://issues.openbravo.com/file_download.php?file_id=737&type=bug
png ireport-encoding-win32.png (486,547) 2009-01-27 10:31
https://issues.openbravo.com/file_download.php?file_id=739&type=bug
Issue History
2009-01-26 18:42networkbNew Issue
2009-01-26 18:42networkbAssigned To => rafaroda
2009-01-26 18:42networkbsf_bug_id0 => 2538167
2009-01-26 18:42networkbFile Added: RptC_OrderPO.jrxml-5.pdf
2009-01-26 18:42networkbRegression testing => No
2009-01-26 18:58networkbDescription Updated
2009-01-26 19:13rafarodaAssigned Torafaroda => iperdomo
2009-01-26 19:33iperdomoFile Added: RptC_OrderPO.jrxml.pdf
2009-01-26 19:33iperdomoFile Added: compile.log
2009-01-26 19:36iperdomoNote Added: 0012654
2009-01-26 19:36iperdomoStatusnew => feedback
2009-01-26 19:46iperdomoNote Added: 0012655
2009-01-27 08:58networkbNote Added: 0012660
2009-01-27 08:59networkbStatusfeedback => new
2009-01-27 10:08iperdomoNote Added: 0012668
2009-01-27 10:09iperdomoNote Added: 0012669
2009-01-27 10:31iperdomoFile Added: ireport-encoding-win32.png
2009-01-27 10:38iperdomoNote Added: 0012672
2009-01-27 12:52iperdomoNote Added: 0012681
2009-01-27 13:42iperdomoNote Added: 0012686
2009-01-27 13:42iperdomoStatusnew => feedback
2009-01-29 13:01iperdomoStatusfeedback => scheduled
2009-01-29 13:01iperdomofix_in_branch => trunk
2009-01-29 13:43svnbotCheckin
2009-01-29 13:43svnbotNote Added: 0012817
2009-01-29 13:43svnbotStatusscheduled => resolved
2009-01-29 13:43svnbotResolutionopen => fixed
2009-01-29 13:43svnbotsvn_revision => 12473
2009-04-21 11:04psarobeStatusresolved => closed

Notes
(0012654)
iperdomo   
2009-01-26 19:36   
I followed the steps and I couldn't reproduce the issue.
Attached you'll find the compilation log (compile.log) after adding "Descripción" and "áéíóúñÑü" to the subreport. You'll see that the translation process was done correctly.
Also attached you'll find the file RptC_OrderPO.jrxml.pdf, that is the one generated from the application after the change.
(0012655)
iperdomo   
2009-01-26 19:46   
Can you please check that the character encoding is set to UTF-8.
- Open the RptC_OrderPO_Lines.jrxml with iReport
- Go to: Edit > Report properties
- Click on the i18n tab
- XML encoding should be: UTF-8
(0012660)
networkb   
2009-01-27 08:58   
Encoding is correct
(0012668)
iperdomo   
2009-01-27 10:08   
I could reproduce it using a Windows machine, modifying the template using iReport 2.0.4, and transferring the modified template using pscp [1]

[1] http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html [^]

---------

translate:
 
compile.translate:
     [java] 0 [main] WARN org.openbravo.translate.Translate - No system languages defined, translation will parse all files.
 
compile.translate:
     [java] 0 [main] WARN org.openbravo.translate.Translate - No system languages defined, translation will parse all files.
 
compile.translate:
     [java] 0 [main] WARN org.openbravo.translate.Translate - No system languages defined, translation will parse all files.
 
compile.translate:
     [java] 0 [main] WARN org.openbravo.translate.Translate - No system languages defined, translation will parse all files.
     [java] 18311 [main] WARN org.openbravo.translate.Translate - Couldn't translate: áéíóúñÃü.Result translated: áéíóúñÃü.Actual file: /org/openbravo/erpReports/RptC_OrderPO_Lines.jrxml
     [java] 18326 [main] WARN org.openbravo.translate.Translate - Couldn't translate: Descripción.Result translated: Descripción.Actual file: /org/openbravo/erpReports/RptC_OrderPO_Lines.jrxml
 
compile:
 
BUILD SUCCESSFUL
Total time: 4 minutes 5 seconds
[openbravo@localhost ~]$
(0012669)
iperdomo   
2009-01-27 10:09   
I couldn't reproduce the error using a iReport version 2.0.4 on a linux machine and transferring the modified template using scp

---------

compile.translate:
     [java] 0 [main] WARN org.openbravo.translate.Translate - No system languages defined, translation will parse all files.
 
compile.translate:
     [java] 0 [main] WARN org.openbravo.translate.Translate - No system languages defined, translation will parse all files.
 
compile.translate:
     [java] 0 [main] WARN org.openbravo.translate.Translate - No system languages defined, translation will parse all files.
 
compile.translate:
     [java] 0 [main] WARN org.openbravo.translate.Translate - No system languages defined, translation will parse all files.
     [java] 18364 [main] WARN org.openbravo.translate.Translate - Couldn't translate: áéíóúñÑü.Result translated: áéíóúñÑü.Actual file: /org/openbravo/erpReports/RptC_OrderPO_Lines.jrxml
     [java] 18378 [main] WARN org.openbravo.translate.Translate - Couldn't translate: Descripción.Result translated: Descripción.Actual file: /org/openbravo/erpReports/RptC_OrderPO_Lines.jrxml
 
compile:
 
BUILD SUCCESSFUL
Total time: 3 minutes 9 seconds
(0012672)
iperdomo   
2009-01-27 10:38   
Added a file: ireport-encoding-win32.png

You can see the jrxml template has Spanish symbols. If you check the jrxml template with a text editor like wordpad or notepad, you'll see all the symbols messed up. It seems an encoding problem with iReport
(0012681)
iperdomo   
2009-01-27 12:52   
The encoding problem on Windows is a 'terminal' problem. Changing the preferences of PuTTy to UTF-8, you can see the correct characters.
(0012686)
iperdomo   
2009-01-27 13:42   
I was not able to reproduce the error.

Best Regards,

Iván
(0012817)
svnbot   
2009-01-29 13:43   
Repository: openbravo
Revision: 12473
Author: iperdomo
Date: 2009-01-29 13:43:37 +0100 (Thu, 29 Jan 2009)

Fixes issue 7142: Force file reading in utf-8

---
U trunk/src-trl/src/org/openbravo/translate/Translate.java
---

https://dev.openbravo.com/websvn/openbravo/?rev=12473&sc=1 [^]