Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370289

Summary: View report as DOC or PDF, chinese characters are displayed as "?" or missed
Product: z_Archived Reporter: lonelywolf <ssh_197967>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: critical    
Priority: P3 CC: bluesoldier, jianchao.li
Version: unspecified   
Target Milestone: 3.7.2   
Hardware: PC   
OS: Linux   
Whiteboard: Obsolete
Attachments:
Description Flags
The report includes chinese and use chinese csv file as data source
none
CSV file as data source
none
Generated doc file none

Description lonelywolf CLA 2012-01-31 20:58:34 EST
Build Identifier: Version: 2.6.1.v20100618-3507w31211924 Build id: v20100915-1750

Design one report includes Chinese character and view it as DOC on Linux. Then open it on windows, Chinese character are displayed as "?".   
It can work well on Windows platform.

Reproducible: Always

Steps to Reproduce:
1.Design one report includes Chinese character and use one csv file as data source
2.View it as DOC it will save one doc file
3.Open it on windows. Chinese character are displayed as "?".

The report and CSV file  will be added as attachment
Comment 1 lonelywolf CLA 2012-01-31 21:01:45 EST
Created attachment 210347 [details]
The report includes chinese and use chinese csv file as data source

when you test it ,please modify the the data source file path,the default dir is /home.
Comment 2 lonelywolf CLA 2012-01-31 21:06:16 EST
Created attachment 210348 [details]
CSV file as data source

The file will be data source file , please place it to /home  directory. Or you can modify the report file and place the directory what you want to
Comment 3 Xiaoying Gu CLA 2012-02-01 00:51:26 EST
Have you installed Chinese character set on the Linux machine?
Comment 4 Xiaoying Gu CLA 2012-02-02 01:11:46 EST
To support Chinese character display, the Chinese character set need to be installed on the OS first. 

Set as worksforme.
Comment 5 Xiaoying Gu CLA 2012-02-02 01:21:51 EST
set status
Comment 6 lonelywolf CLA 2012-02-02 19:57:57 EST
(In reply to comment #5)
> set status

Yes I installed the chinese character.  It can work well when view it as HTML and PPT.  For doc, all chinese character is displayed as "?".For PDF, some character is missed.
Comment 7 Xiaoying Gu CLA 2012-02-02 22:15:06 EST
Could you please attache the generated doc file us to investigate?
Comment 8 lonelywolf CLA 2012-02-03 00:57:18 EST
Created attachment 210488 [details]
Generated doc file
Comment 9 Jianchao Li CLA 2012-02-06 02:04:23 EST
If no font can display a character, DOC and PDF emitter will replace the character with the missing char '?'.  It works well on my Linux platform in which the Chinese fonts/font families that specified by the report are properly installed.
Please check your font configuration.
Comment 10 lonelywolf CLA 2012-02-06 03:54:33 EST
(In reply to comment #9)
> If no font can display a character, DOC and PDF emitter will replace the
> character with the missing char '?'.  It works well on my Linux platform in
> which the Chinese fonts/font families that specified by the report are properly
> installed.
> Please check your font configuration.

Yes, I check the source code and find it will replace with "?"But why the PPT and HTML work well?  Did you test my added birt file? if yes, could you tell me which package should be installed on Linux? thanks
Comment 11 Jianchao Li CLA 2012-02-06 04:36:30 EST
(In reply to comment #10)
> (In reply to comment #9)
> > If no font can display a character, DOC and PDF emitter will replace the
> > character with the missing char '?'.  It works well on my Linux platform in
> > which the Chinese fonts/font families that specified by the report are properly
> > installed.
> > Please check your font configuration.
> 
> Yes, I check the source code and find it will replace with "?"But why the PPT
> and HTML work well?  Did you test my added birt file? if yes, could you tell me
> which package should be installed on Linux? thanks

PPT and HTML generation does not include the font resources in the machine that generating the file, so that PPT and HTML emitters output the unknown characters's information to the target file. 

The default font mapping for font “sans-serif” is specified as "Lucida Sans" in org.eclipse.birt.report.engine.fonts\fontsConfig_linux.xml. To make it work well, you should install the "Lucida Sans" font on your machine, or modified the default font mapping for "sans-serif".
Comment 12 Xiaoying Gu CLA 2012-02-21 03:12:24 EST
Set as workforme per comment #11