commit b9f33ed4d6b6e97bb5766f41b8db63e96ed22589
parent e83ad812246215bbb9d25970ae8650ccb44661db
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Mon, 31 Aug 2009 22:59:24 -0400
Merge branch 'master' into next
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
@@ -177,7 +177,7 @@ class String
## nasty multibyte hack for ruby 1.8. if it's utf-8, split into chars using
## the utf8 regex and count those. otherwise, use the byte length.
def display_length
- if $encoding == "UTF-8"
+ if $encoding == "UTF-8" || $encoding == "utf8"
scan(/./u).size
else
size