aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.htaccess1
-rw-r--r--config_defaults.rb2
-rw-r--r--dudle.rb4
-rw-r--r--vcs_git.rb2
4 files changed, 5 insertions, 4 deletions
diff --git a/.htaccess b/.htaccess
index 8f86084..d1ed568 100644
--- a/.htaccess
+++ b/.htaccess
@@ -10,6 +10,7 @@ RewriteCond %{SCRIPT_FILENAME} !favicon.ico
RewriteRule ^.*$ /maintenance.cgi [R=503,L]
ErrorDocument 503 /maintenance.cgi
+SetEnv LC_ALL "en_US.UTF-8"
<FilesMatch "^\.ht.*">
deny from all
diff --git a/config_defaults.rb b/config_defaults.rb
index 98f5bd3..75e1412 100644
--- a/config_defaults.rb
+++ b/config_defaults.rb
@@ -34,7 +34,7 @@ else
protocol = "http"
port = ":#{$cgi.server_port}"
end
-$conf.siteurl = "#{protocol}://#{$cgi.server_name}#{port}#{$cgi.script_name.gsub(/[^\/]*$/,"")}".force_encoding("UTF-8")
+$conf.siteurl = "#{protocol}://#{$cgi.server_name}#{port}#{$cgi.script_name.gsub(/[^\/]*$/,"")}"
$conf.breadcrumbs = []
$conf.header = []
diff --git a/dudle.rb b/dudle.rb
index 6fe30d4..31f9c7e 100644
--- a/dudle.rb
+++ b/dudle.rb
@@ -33,7 +33,7 @@ require "locale"
if File.exists?("data.yaml") && !File.stat("data.yaml").directory?
$is_poll = true
- GetText.bindtextdomain("dudle", :path => Dir.pwd.force_encoding("UTF-8") + "/../locale/")
+ GetText.bindtextdomain("dudle", :path => Dir.pwd + "/../locale/")
else
$is_poll = false
GetText.bindtextdomain("dudle", :path => Dir.pwd + "/locale/")
@@ -126,7 +126,7 @@ class Dudle
@basedir = ".."
inittabs
@table = YAML::load(VCS.cat(self.revision, "data.yaml"))
- @urlsuffix = File.basename(File.expand_path(".")).force_encoding("UTF-8")
+ @urlsuffix = File.basename(File.expand_path("."))
@title = @table.name
diff --git a/vcs_git.rb b/vcs_git.rb
index 13b0b3a..6b3225f 100644
--- a/vcs_git.rb
+++ b/vcs_git.rb
@@ -23,7 +23,7 @@ require_relative "log"
require "open3"
def runcmd *args
- Open3.popen3(*args) {|i,o,e,t| o.read.force_encoding('utf-8') }
+ Open3.popen3(*args) {|i,o,e,t| o.read }
end
class VCS