naitoh / rbpdf

Ruby on Rails TCPDF plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

function get_string_width changes encoding

ahorek opened this issue · comments

str = 'test'.force_encoding('UTF-8')
width = pdf.get_string_width(str)
str.encoding => ASCII-8bit