commit 16f1f0c6073b2eb1d1fc47a01ae3cc94e84520d6
parent 969061797a2a5e67c4869b64a00cd4511db27237
Author: Israel Herraiz <israel.herraiz@gmail.com>
Date: Tue, 25 Aug 2009 11:29:01 +0200
add UTF-8 encoding string for ArchLinux systems
in ArchLinux, UTF-8 encoding is identified by "utf8" instead of
"UTF-8".
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