chiark / gitweb /
set content-type charset and LC_CTYPE to UTF-8
[ypp-sc-tools.web-live.git] / yarrg / Commods.pm
index 5003037b1389b4cede801a2300dea6e99be69c42..0f7ebd63a253919301b58c90855c42284c5295f7 100644 (file)
@@ -41,7 +41,8 @@ BEGIN {
                      &pipethrough_prep &pipethrough_run
                      &pipethrough_run_along &pipethrough_run_finish
                      &pipethrough_run_gzip
-                     &cgipostform &yarrgpostform &cgi_get_caller);
+                     &cgipostform &yarrgpostform &cgi_get_caller
+                     &set_ctype_utf8);
     %EXPORT_TAGS = ( );
 
     @EXPORT_OK   = qw();
@@ -220,6 +221,9 @@ sub get_our_version ($$) {
     chomp($version);
     $aref->{"${prefix}version"}= $version;
     return $aref;
+    # clientname       "ypp-sc-tools"
+    # clientversion    2.1-g2e06a26  [from git-describe --tags HEAD]
+    # clientfixes      "lastpage"  [space separated list]
 }
 
 sub pipethrough_prep () {
@@ -353,4 +357,8 @@ sub cgi_get_caller () {
     return $caller;
 }
 
+sub set_ctype_utf8 () {
+    setlocale(LC_CTYPE, "en.UTF-8");
+}
+
 1;