chiark / gitweb /
set content-type charset and LC_CTYPE to UTF-8
[ypp-sc-tools.web-live.git] / yarrg / commod-email-processor
index de68fbad98250c24cb43199cb1316e7dc4f79a0f..b395aa8d851fc1ede7bc385968b20b65d8758eca 100755 (executable)
 # are used without permission.  This program is not endorsed or
 # sponsored by Three Rings.
 
-# Emails are:
-#  multipart/mixed, containing
-#   text/plain; name="metadata"; charset="utf-8"
-#   Content-Disposition: inline; filename="metadata"
-#     ocean\t<ocean>           canonical mixed case
-#     island\t<island>         canonical mixed case
-#     timestamp\t<digits>      time_t (non-leap secs since start of 1970 UTC)
-#     clientname\t<cname>      may contain spaces
-#     clientversion\t<cversion>        may contain spaces
-#     clientfixes\t<cfixes>    space-delimited list
-#     clientspec\t<cspec>      <cname>\t<cversion>\t<cfixes>
-#     servername\t<sname>      may contain spaces
-#     serverversion\t<sversion>        may contain spaces
-#     serverfixes\t<sfixes>    space-delimited list
-#     serverspec\t<sspec>      <sname>\t<serverversion>\t<serverfixes>
-#   application/octet-stream; name="deduped.tsv.gz"
-#   Content-Disposition: attachment; filename="deduped.tsv.gz"
-#     <base64>
-
 use strict (qw(vars));
 
 use POSIX;
@@ -58,7 +39,7 @@ BEGIN {
 use Commods;
 use CommodsDatabase;
 
-setlocale(LC_CTYPE, "en_GB.UTF-8");
+set_ctype_utf8();
 my $parser= new MIME::Parser;
 our $entity;