Ticket #394 (assigned defect)

Opened 4 months ago

Last modified 4 months ago

Wrong text rendering with unicode chars

Reported by: ruport Assigned to: sandal (accepted)
Milestone: Keywords:
Cc:

Description

I have encountered a defect when rendering a report using a text formatter. My data contains unicode strings with German umlauts, but the issue should concern other unicode symbols as well.

The bug is, that strings containing these special characters are not spaced correctly, i.e. if they contain one of these characters, the spacing after the string is one blank too short. This could possibly be caused by the fact that these unicode characters are combinations of two chars and thus the length of the string might not have been calculated correctly. This might also be a problem of Ruby itself, I have just checked that in irb "Käse".length returns 5 instead of 4, too.

Anyway, just wanted to let you know.

Change History

08/06/08 13:19:27 changed by sandal

  • status changed from new to assigned.
  • owner set to sandal.

Yeah, Ruby 1.8 has pretty poor support for unicode, so presently, Ruport is not UTF-8 aware.

However, once we integrate Prawn for our PDF generation which *is* UTF-8 aware, it would make sense for us to go and do the best we can to beef up m17n support library wide.

At the very least, we'll be one step closer to Ruby 1.9 compatibility, where encoding issues are less severe.

I know this issue is very frustrating for people, so I'll try to take care of this in the near future. If anyone wants to lend a hand, fork the repository at:

http://github.com/ruport/ruport