Defect #8566

Exported PDF UTF-8 Vietnamese not correct

Added by Van Nam Nguyen over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:2011-06-08
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

100%

Category:PDF export
Target version:1.2.1
Resolution:Fixed Affected version:1.2.0

Description

Hi everybody,
I am using Redmine 1.2 on Centos 5.6, Rails 2.3.11, Ruby 1.87.
When i export issues list, the text has strange.
Attached below

export2.pdf (40.8 KB) Van Nam Nguyen, 2011-06-09 06:52

font.png (52.6 KB) Toshi MARUYAMA, 2011-06-09 07:04


Related issues

Related to Redmine - Defect #61: Broken character encoding in pdf export Closed
Related to Redmine - Patch #8312: Switch to TCPDF from FPDF for PDF export Closed 2011-05-06
Related to Redmine - Defect #8892: Unused fonts in rfpdf plugin folder Closed 2011-07-24

Associated revisions

Revision 6018
Added by Toshi MARUYAMA over 6 years ago

PDF: change Vietnamese vi.yml general_pdf_encoding from UTF-8 to CP1258 (#8566).

Revision 6030
Added by Toshi MARUYAMA over 6 years ago

PDF: Import DejaVu fonts (#8566).

http://rfpdf.googlecode.com/files/DejaVu.zip
Sep. 2007
fils size 3,685,721
md5sum: 54274d105b74f817d649035fc1541d8a

rename files.
  • DejaVuSans.rb to dejavusans.rb
  • DejaVuSansb.rb to dejavusansb.rb
  • DejaVuSansi.rb to dejavusansi.rb

Revision 6031
Added by Toshi MARUYAMA over 6 years ago

PDF: fix font name in vendor/plugins/rfpdf/lib/fonts/dejavusansi.rb (#8566).

Revision 6034
Added by Toshi MARUYAMA over 6 years ago

PDF: back out r6018 (#8566).

change Vietnamese vi.yml general_pdf_encoding from CP1258 to UTF-8.

Revision 6035
Added by Toshi MARUYAMA over 6 years ago

PDF: use DejaVuSans fonts in Vietnamese (#8566).

Revision 6401
Added by Toshi MARUYAMA over 6 years ago

PDF: remove unused DejaVuSans-ExtraLight font (#8892, #8566).

Revision 6402
Added by Toshi MARUYAMA over 6 years ago

PDF: remove unused DejaVu fonts except DejaVuSans-BoldOblique (#8892, #8566).

FreeSans has freesansbi.rb. But there is no dejavusansbi.rb.

History

#1 Updated by Toshi MARUYAMA over 6 years ago

  • Subject changed from Exported UTF-8 Vietnamese not correct to Exported PDF UTF-8 Vietnamese not correct
  • Assignee deleted (Toshi MARUYAMA)

I changed general_pdf_encoding from UTF-8 to CP1258 in trunk r6018 and 1.2-stable r6019.
source:trunk/config/locales/vi.yml@6013#L192

Please check PDF correct.

#2 Updated by Van Nam Nguyen over 6 years ago

  • File export2.pdf added
  • Assignee set to Toshi MARUYAMA

Dear Toshi,
I had changed general_pdf_encoding from UTF-8 to CP1258 in source:trunk/config/locales/vi.yml@6013#L192 but the issue not solved.

#3 Updated by Toshi MARUYAMA over 6 years ago

What font is used in Vietnamese?

#4 Updated by Van Nam Nguyen over 6 years ago

I had install ArialMT font on my PC. But this font not full support Vietnamese. Best for Vietnamese Unicode are Arial, Time New Roman, Tahoma and many unicode Windows font. I think this issue did'nt solve last 1 year http://www.redmine.org/boards/2/topics/10885?r=16448

#5 Updated by Toshi MARUYAMA over 6 years ago

  • % Done changed from 0 to 30

#6 Updated by Toshi MARUYAMA over 6 years ago

I pushed my bitbucket mercurial repository.
Please try it.
https://bitbucket.org/marutosi/redmine-vietnamese-pdf

#7 Updated by Van Nam Nguyen over 6 years ago

Good job Toshi!

The issue has been fix, now Vietnamese display correctly. Thanks you.
May be you need to add this to trunk.

#8 Updated by Toshi MARUYAMA over 6 years ago

  • Target version set to 1.2.1

#9 Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from New to Closed
  • % Done changed from 30 to 100
  • Resolution set to Fixed

Committed in trunk and 1.2-stable, thanks.

#10 Updated by Vinh Nguyen over 6 years ago

Hi, Toshi MARUYAMA and Van Nam Nguyen
I'm a newbie in using redmine. I have problem with "Exported PDF UTF-8 Vietnamese not correct", too.
I try to connect "https://bitbucket.org/marutosi/redmine-vietnamese-pdf" but it has missing.
Can you reupload?

#11 Updated by Toshi MARUYAMA over 6 years ago

This issue is fixed in Redmine 1.2.1.
So, I deleted my Bitbucket Mercurial repository.
Could you upgrade Redmine to 1.2.1?

#12 Updated by Toshi MARUYAMA over 6 years ago

Redmine 1.2 switches fonts by user locale.
To use DejaVuSans fonts, you need to select Vietnamese locale in account setting.

#13 Updated by Vinh Nguyen over 6 years ago

i'm a newbie, so i follow this tutorial "http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI_on_Windows_with_Apache" to install, and i install redmine 1.0.4
And i don't know how to upgrade redmine 1.2.1
please, help me!

#14 Updated by Vinh Nguyen over 6 years ago

@Toshi MARUYAMA: i have updated redmine 1.2.1, and select Vietnamese locale in account setting, and the bug was fixed, but i have to use Vietnammese in my site. How can i fix this bug, but still use English???

#15 Updated by Vinh Nguyen over 6 years ago

and thanks for your help!

Also available in: Atom PDF