Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016048Openbravo ERP09. Financial managementpublic2011-02-24 16:312011-03-22 12:16
adrianromero 
egoitz 
urgentmajoralways
closedfixed 
5
2.50MP26 
2.50MP28 
Core
No
0016048: Error when visualizing Balance sheet and P&L structure report in Japanese
Error when visualizing Balance sheet and P&L structure report in Japanese.
Japanese characters are not properly handled and showed as #
1. Install Japanese translation
2. Follow http://wiki.openbravo.com/wiki/Balance_sheet_and_PL_structure [^] to configure reports
3. Execute report in PDF
No tags attached.
depends on defect 0015812 closed egoitz Error when visualizing Balance sheet and P&L structure report in Japanese 
Issue History
2011-02-24 16:31adrianromeroNew Issue
2011-02-24 16:31adrianromeroAssigned To => dalsasua
2011-02-24 16:31adrianromeroModules => Core
2011-02-24 16:31adrianromeroIssue generated from0015812
2011-02-24 16:31adrianromeroRelationship addeddepends on 0015812
2011-02-24 16:31adrianromeroStatusnew => scheduled
2011-02-24 16:31adrianromerofix_in_branch => pi
2011-02-28 10:10egoitzAssigned Todalsasua => egoitz
2011-02-28 10:10egoitzfix_in_branchpi =>
2011-03-08 13:47hgbotCheckin
2011-03-08 13:47hgbotNote Added: 0034658
2011-03-08 13:47hgbotStatusscheduled => resolved
2011-03-08 13:47hgbotResolutionopen => fixed
2011-03-08 13:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/4addfde43b68af8a91ec3eeaef7d1898a8ac9b9f [^]
2011-03-08 13:47egoitzNote Added: 0034659
2011-03-08 13:47egoitzNote Added: 0034660
2011-03-22 12:16jonalegriaesarteNote Added: 0035141
2011-03-22 12:16jonalegriaesarteStatusresolved => closed
2011-03-22 12:16jonalegriaesarteFixed in Version => 2.50MP28

Notes
(0034658)
hgbot   
2011-03-08 13:47   
Repository: erp/stable/2.50
Changeset: 4addfde43b68af8a91ec3eeaef7d1898a8ac9b9f
Author: Egoitz Castillo <egoitz.castillo <at> openbravo.com>
Date: Tue Mar 08 13:46:34 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/4addfde43b68af8a91ec3eeaef7d1898a8ac9b9f [^]

Fixed bug 16048. Error when visualizing Balance sheet in Japanese

---
M src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo
---
(0034659)
egoitz   
2011-03-08 13:47   
* How to test the issue
It is not a bug, but a configuration problem, so the only change done is to allow configuring the report properly.
A font-family has been defined for the whole document, because this fix only some fields had a font-family.

 *Other areas affected
It has only been modified a property on a fo file, no other areas are affected by this fix
(0034660)
egoitz   
2011-03-08 13:47   
How to configure the application to allow using Japanese in fo reports:

1- Get the needed fonts that include special characters for Japanse.
 It has been tested with: Ms Gothc, Ms PGothic, Ms UI Gothc and Ms Micho.

2- Convert the font file to xml using the same fop version that version used on Openbravo (fop 0.20.5) http://archive.apache.org/dist/xmlgraphics/fop/binaries/fop-0.20.5-bin.tar.gz [^] [^]
To convert use the following order on the fop application downloaded:
For example to use MS UI Gothic font, after get the ttc file needed.

java -cp build/fop.jar:lib/avalon-framework-4.2.0.jar:lib/commons-logging-1.0.4.jar:lib/commons-io-1.3.1.jar:lib/xmlgraphics-commons-1.3.1.jar org.apache.fop.fonts.apps.TTFReader -ttcname "MS UI Gothic" /home/openbravo/fonts/msgothic.ttc /home/openbravo/fonts/msgothic.xml


3-Configure the config/userconfig.xml file to use this new font:

Add this new source, on configuration tag of the file:

<fonts>
<font metrics-file="/home/openbravo/fonts/msgothic.xml" embed-file="/home/openbravo/fonts/msgothic.ttc" kerning="yes">
<font-triplet name="Helvetica" style="normal" weight="normal"/>
<font-triplet name="Helvetica" style="normal" weight="bold"/>
<font-triplet name="Helvetica" style="italic" weight="normal"/>
<font-triplet name="Helvetica" style="italic" weight="bold"/>
<font-triplet name="Helvetica" weight="bold"/>
<font-triplet name="Helvetica"/>
</font>
</fonts>

4-Ejecute: ant smartbuild
5-Restart tomcat.

Now the report should be shown correctly on Japanese
(0035141)
jonalegriaesarte   
2011-03-22 12:16   
Verified