Jump to content

chinese font cannot show apostrophe ( \' )


cokelight88

Recommended Posts

I am using jasper report 3.6.0. I want to display a static text and text field that both contain chinese and english character.

For testing, I type the string "我Gaddi's" in a static field. Then using the server (deployed an application to generate pdf  in weblogic server 10) to generate the pdf file. The generated file shows "我Gaddi s" where the apostrophe is missing. Is there any suggest to fix it?
The jrxml and the generated pdf is attached.

I using the following setting:

Pdf Font name    MSung-Light
Pdf Embedded    true
Pdf Encoding    UniCNS-UCS2-H (Chinese traditional)

jasperreport 3.6.0
ireport 3.6.0
weblogic server 10
java 1.5


Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

Check the /demo/samples/unicode sample provided with JasperReports. You'll see it displays some Chinese characters (try a recent version of JR).

That sample uses an open source Chinese TrueType font called "AR PL KaitiM GB". See if in that sample, your apostrophe character works. It would be interesting to see the code of your character. Maybe it is not the ASCII one, but rather a special apostrophe, not supported by the fonts you used.

 

I hope this helps.
Teodor

 

Link to comment
Share on other sites

Hi,

I found that I'd the same problem running Jasperreport with output field having mixed English and Chinese characters for a while.  My generated jasperreport output in pdf seems to have its ( ' ) disappeared when it is viewed using Acrobat Reader 8.0.

However, the same file viewed by Evince in Linux environment does show the ( ' ).  It means that the ( ' ) exists in the generated pdf output.  Then, I update Acrobat Reader 8.0 to Acrobat 9.2, and the ( ' ) shows up in the pdf output.

Note: Using mixed characters (English and Chinese) in the same output field, Jasperreport DOES NOT do a very good job on handling long field wrap around lines.  Sometimes, it just truncates some characters till the end instead of wrap around.

Waybill Mak
Hong Kong

Link to comment
Share on other sites

  • 3 years later...
I still have one doubt here, You can set pdfFontname ONLY if you know exactly which language the data is coming from.But lets suppose in my application user can have his personal details entered in either english or chinese or korean or thai etc.. and i need to generate PDF of personal details then setting pdfEncoding to specific chinese language will not help here. correct? is there any GENERIC way to handle internationalisation?
Link to comment
Share on other sites

I still have one doubt here, You can set pdfFontname ONLY if you know exactly which language the data is coming from.But lets suppose in my application user can have his personal details entered in either english or chinese or korean or thai etc.. and i need to generate PDF of personal details then setting pdfEncoding to specific chinese language will not help here. correct? is there any GENERIC way to handle internationalisation?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...