Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

UTF-8 characters containing lines produces wrong column width #28

Closed
blacktea opened this Issue · 2 comments

3 participants

@blacktea

UTF-8 characters containing lines produces wrong column width

At least working in rails 2.3 (ruby 1.8.7), mb_string.size and to_s.size differs, thus producing different column widths.

@blacktea

Ended up latinizing all my UTF strings, using this script

https://gist.github.com/4387820

@nateberkopec nateberkopec added bug and removed enhancement labels
@sodabrew

I am certain this can be closed. Ruby 1.9 and above correctly handles UTF-8 lengths by separating the character size from the byte size - see String#size and String#bytesize:

http://ruby-doc.org/core-1.9.3/String.html#method-i-size
http://ruby-doc.org/core-1.9.3/String.html#method-i-bytesize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.