#!/usr/local/bin/perl -w ################################################################ #Code is to filter and change High Ascii to UTF-8 compliant ccs# # Written By. tdadis@digitalthink.com # ################################################################ require 5.003; use CGI qw(:all); use strict; package main; $OUTPUT_AUTOFLUSH = 1; $main::cgi = new CGI; ###################################################################### #if the FeatureName: $Course = to multilingual course code do this # ###################################################################### if (#######) { SendTheMulitibitMail(); SendSuccessPage(); Multilingual(); } else { SendTheMail(); SendSuccessPage(); } ####################################################################### # This Sub to change multibit ascii characters to UTF-8 compliant # ####################################################################### sub Multilingual { local ($_) =@_; return $_ < 0x80 ? chr($_): $_ < 0x800 ? chr($_>>6&0x3f|0xC0) . chr($_&0x80) : chr($_>>12&0x0F|0xE0) .chr($_>>6&0x3F|0x80) .chr($_&0x3F|0x80); } s//&utf8(hex($1))/gei; ############################################################################# #The sub SendTheMultibitMail is changed only in the to mail bucket # ############################################################################# sub SendTheMultibitMail { my ($to) = '####somemailbucket####'; my ($cc) = '#####@digitalthink.com'; my ($from) = '####@digitalthink.com'; my ($subject) = 'defect submit'; my ($type) = $main::cgi->param('Type'); my ($bugsubject) = $main::cgi->param('BugSubject'); my ($course) = $main::cgi->param('Course'); my ($hardware) = $main::cgi->param('Hardware'); my ($operatingsystem) = $main::cgi->param('OS'); my ($browser) = $main::cgi->param('Browser'); my ($modulenumber) = $main::cgi->param('ModuleNumber'); my ($lessonnumber) = $main::cgi->param('LessonNumber'); my ($description) = $main::cgi->param('Description'); my ($name) = $main::cgi->param('Name'); my ($email) = $main::cgi->param('EMail'); my ($priority) = $main::cgi->param('Priority'); my ($project) = $main::cgi->param('Project'); my ($subsystem) = $main::cgi->param('Subsystem'); my ($stage) = $main::cgi->param('Stage'); open (MAIL, "|/usr/lib/sendmail -t") || Error("Unable to run mail program"); print MAIL <