aboutsummaryrefslogtreecommitdiff
path: root/charset.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-12-04 12:03:08 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-12-04 12:03:08 +0100
commitb3b03b8fcee539fc2e8971c83fe74c6688eda3b1 (patch)
treeecb8da69b6dfd28294dd001c6237f561eb90683d /charset.rb
parente54639f13719382ea5673444a8873d918391ef1a (diff)
use utf8 by default
Diffstat (limited to 'charset.rb')
-rw-r--r--charset.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/charset.rb b/charset.rb
index 2a1c7a6..418e5a5 100644
--- a/charset.rb
+++ b/charset.rb
@@ -17,9 +17,13 @@
# along with dudle. If not, see <http://www.gnu.org/licenses/>. #
############################################################################
-if ($cgi.include?("utf") || $cgi.cookies["utf"][0]) && !$cgi.include?("ascii")
- USEUTF = true
-
+USEUTF = true
+USEUTF = false if $cgi.user_agent =~ /.*MSIE [56]\..*/
+USEUTF = false if $cgi.cookies["ascii"][0]
+USEUTF = true if $cgi.include?("utf")
+USEUTF = false if $cgi.include?("ascii")
+
+if USEUTF
NOSORT = CGI.escapeHTML('▾▴')
SORT = CGI.escapeHTML('▴')
REVERSESORT = CGI.escapeHTML('▾')
@@ -40,8 +44,6 @@ if ($cgi.include?("utf") || $cgi.cookies["utf"][0]) && !$cgi.include?("ascii")
PASSWORDSTAR = CGI.escapeHTML("•")
else
- USEUTF = false
-
NOSORT = ''
SORT = CGI.escapeHTML('^')
REVERSESORT = CGI.escapeHTML('reverse')