Project

General

Profile

Exported UTF-8 Vietnamese looks strange

Added by Hung Nguyen Vu almost 15 years ago

Hello all,

I am using redmine 0.8.7, ruby 1.8.5, rake 0.76 and rails 2.3.5 on Linux CentOS 5.4.
Exported pdf file sample: included.
config/settings.yml: included.
config/locales/vi.yml: included.

Probably related problems:
http://www.redmine.org/boards/2/topics/1400#message-1401

Any help would be greatly appreciated.


Replies (13)

RE: Exported UTF-8 Vietnamese looks strange - Added by chaninan jitonnom almost 15 years ago

so, in Thai language has the same problem

RE: Exported UTF-8 Vietnamese looks strange - Added by Holger Just almost 15 years ago

Looks like this is one of the oldest still open issue of Redmine. See issue #61

There seems to no real fix yet. Sorry folks...

--Holger

RE: Exported UTF-8 Vietnamese looks strange - Added by Hung Nguyen Vu almost 15 years ago

Holger Just wrote:

Looks like this is one of the oldest still open issue of Redmine. See issue #61

There seems to no real fix yet. Sorry folks...

Thanks for answering. It is sad to hear that.

RE: Exported UTF-8 Vietnamese looks strange - Added by Duy Linh Nguyen over 14 years ago

Just fix vietnamese problems by following steps:

1. Apply this patch: http://www.redmine.org/attachments/2123/pdf-0.8.4.patch
2. Download DejaVu fonts from: http://rfpdf.googlecode.com/files/DejaVu.zip
3. Unzip DejaVu.zip to vendor/plugins/rfpdf/lib/fonts
4. Change font name in file lib/redmine/export/pdf.rb to DejaVuSans

     53           when 'zh-tw'
     54             extend(PDF_Chinese)
     55             AddBig5Font()
     56             @font_for_content = 'Big5'
     57             @font_for_footer = 'Big5'
     58           else
     59             @font_for_content = 'DejaVuSans'
     60             @font_for_footer = 'DejaVuSans'
     61           end

5. Execute following commands:

cd vendor/plugins/rfpdf/lib/fonts
cp DejaVuSans.rb dejavusans.rb
cp DejaVuSansb.rb dejavusansb.rb
cp DejaVuSansi.rb dejavusansi.rb

6. Restart redmine

RE: Exported UTF-8 Vietnamese looks strange - Added by Duy Linh Nguyen over 14 years ago

Oh, you must update rfpdf to lastest version before doing these steps.
Duy Linh Nguyen wrote:

Just fix vietnamese problems by following steps:

1. Apply this patch: http://www.redmine.org/attachments/2123/pdf-0.8.4.patch
2. Download DejaVu fonts from: http://rfpdf.googlecode.com/files/DejaVu.zip
3. Unzip DejaVu.zip to vendor/plugins/rfpdf/lib/fonts
4. Change font name in file lib/redmine/export/pdf.rb to DejaVuSans
[...]

5. Execute following commands:
[...]
6. Restart redmine

RE: Exported UTF-8 Vietnamese looks strange - Added by Hung Nguyen Vu over 14 years ago

What are the versions of your:rake, ruby, gem, redmine, rfpdf

RE: Exported UTF-8 Vietnamese looks strange - Added by Duy Linh Nguyen over 14 years ago

I'm using redmine trunk.
And force re-install rfpdf by command:

ruby script/plugin install --force git://github.com/edwinmoss/rfpdf.git

RE: Exported UTF-8 Vietnamese looks strange - Added by Hung Nguyen Vu over 14 years ago

I've tried:

Environment:

ruby 1.8.5
redmine 0.8.7
gem 1.3.5

cd /var/www/html/redmine/redmine-0.8.7/
ruby script/plugin install --force git://github.com/edwinmoss/rfpdf.git

Follows: http://www.redmine.org/boards/2/topics/10885#message-16364

Start redmine

/var/www/html/redmine/redmine-0.8.7/vendor/rails/activesupport/lib/active_support/dependencies.rb:276:in `load_missing_constant': uninitialized constant ActiveSupport::Memoizable (NameError)
        from /var/www/html/redmine/redmine-0.8.7/vendor/rails/activesupport/lib/active_support/dependencies.rb:468:in `const_missing'
        from /var/www/html/redmine/redmine-0.8.7/vendor/plugins/rfpdf/lib/rfpdf/template_handler/compile_support.rb:5
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /var/www/html/redmine/redmine-0.8.7/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
        from /var/www/html/redmine/redmine-0.8.7/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
        from /var/www/html/redmine/redmine-0.8.7/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
        from /var/www/html/redmine/redmine-0.8.7/vendor/plugins/rfpdf/lib/rfpdf.rb:29
         ... 30 levels...
        from /var/www/html/redmine/redmine-0.8.7/vendor/rails/railties/lib/commands/server.rb:39
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from script/server:3
=> Booting WEBrick...

Did I missed something?

RE: Exported UTF-8 Vietnamese looks strange - Added by Duy Linh Nguyen over 14 years ago

Vu Hung Nguyen wrote:

I've tried:

Environment:
[...]

cd /var/www/html/redmine/redmine-0.8.7/
ruby script/plugin install --force git://github.com/edwinmoss/rfpdf.git

Follows: http://www.redmine.org/boards/2/topics/10885#message-16364

Start redmine

[...]

Did I missed something?

Could you upgrade Redmine to 1.0.x or Redmine trunk?

RE: Exported UTF-8 Vietnamese looks strange - Added by Hung Nguyen Vu over 14 years ago

Duy Linh Nguyen wrote:

Could you upgrade Redmine to 1.0.x or Redmine trunk?

I will try, but not now because some plugins may break after being upgraded to 1.0.
You know, real world business loves stability, not the word trunk or I am not so brave.

RE: Exported UTF-8 Vietnamese looks strange - Added by Hung Nguyen Vu over 14 years ago

Vu Hung Nguyen wrote:

Duy Linh Nguyen wrote:

Could you upgrade Redmine to 1.0.x or Redmine trunk?

I will try, but not now because some plugins may break after being upgraded to 1.0.
You know, real world business loves stability, not the word trunk or I am not so brave.

    (1-13/13)