From: israel.herraiz@gmail.com (Israel Herraiz)
Subject: [sup-talk] [PATCH] Add UTF-8 encoding string for ArchLinux systems
Date: Tue, 25 Aug 2009 11:29:01 +0200 [thread overview]
Message-ID: <1251192382-sup-2350@elly> (raw)
Hi,
in ArchLinux, UTF-8 encoding is identified by "utf8" instead of
"UTF-8".
Cheers,
Israel
---
lib/sup/util.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
index 068ce6b..f99e1c1 100644
--- 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
--
1.6.4
next reply other threads:[~2009-08-25 9:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 9:29 Israel Herraiz [this message]
2009-09-01 2:57 ` William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1251192382-sup-2350@elly \
--to=israel.herraiz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox