I'm guessing Chinese sentences have no spaces?
I use this for one Prawn document to enable linebreaks in potentially
long e-mail addresses:
def linebreakable_email
# Turn e.g. '
f...@bar.baz.com' into 'foo<font size="0">
</font>@<font size="0"> </font>
bar.baz.com'
# so Prawn line-breaks it correctly.
@customer.email.split(/(@)/).reject(&:blank?).map {|part|
h(part) }.join('<font size="0"> </font>')
end
It requires prawn-format. It (intentionally) doesn't insert any
hyphens. The trick is that it inserts spaces, which Prawn may break on
(Prawn never breaks inside words), but the spaces have no width, so if
it doesn't break the line, you don't see a space.
I'm sure you could do something similar.