You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that when formatting a unicode characters within a %2s format string, the raw byte length of the unicode String is used instead of the character length.
Expected Behavior
("%2s" % "☃").length# => 2
Actual Behavior
("%2s" % "☃").length# => 1
Version Info
$ truffleruby -v
truffleruby 21.2.0.1, like ruby 2.7.3, GraalVM CE Native [x86_64-linux]
The text was updated successfully, but these errors were encountered:
postmodern
changed the title
%2s does not add left-padding for unicode characters
"%2s" does not add left-padding for unicode characters
Aug 20, 2021
postmodern
changed the title
"%2s" does not add left-padding for unicode characters
"%2s" does not add left-padding when given a unicode character
Aug 20, 2021
It appears that when formatting a unicode characters within a
%2s
format string, the raw byte length of the unicode String is used instead of the character length.Expected Behavior
Actual Behavior
Version Info
The text was updated successfully, but these errors were encountered: