aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--charset.rb12
-rwxr-xr-xcustomize.rb6
2 files changed, 10 insertions, 8 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')
diff --git a/customize.rb b/customize.rb
index cb01002..d49d10e 100755
--- a/customize.rb
+++ b/customize.rb
@@ -56,9 +56,9 @@ HEAD
end
-a = [["Use normal strings","ascii"],
- ["Use special characters (#{UTFCHARS})","utf", "Use this options if you see the characters in the parenthesis."]]
-$d.html.add_cookie("utf","true","/",Time.now + (1*60*60*24*365 * (USEUTF ? 1 : -1 )))
+a = [["Use special characters (#{UTFCHARS})","utf", "Use this option if you see the characters in the parenthesis."],
+ ["Use only normal strings","ascii","Use this option if you have problems with some characters."]]
+$d.html.add_cookie("ascii","true","/",Time.now + (1*60*60*24*365 * (USEUTF ? -1 : 1 )))
$d << <<CHARSET
<div id='charset'>
<h3>Charset</h3>