forcing UTF-8
This commit is contained in:
parent
a613689910
commit
dd9b1693cf
5 changed files with 4 additions and 6 deletions
|
|
@ -16,7 +16,6 @@ package WebGUI::HTTP;
|
||||||
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use WebGUI::International;
|
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
use WebGUI::Style;
|
use WebGUI::Style;
|
||||||
|
|
||||||
|
|
@ -69,7 +68,7 @@ sub getHeader {
|
||||||
} else {
|
} else {
|
||||||
%params = (
|
%params = (
|
||||||
-type => $session{http}{mimetype} || "text/html",
|
-type => $session{http}{mimetype} || "text/html",
|
||||||
-charset => $session{http}{charset} || WebGUI::International::getLanguage($session{page}{languageId},"charset") || "UTF-8"
|
-charset => "UTF-8"
|
||||||
);
|
);
|
||||||
if ($session{setting}{preventProxyCache}) {
|
if ($session{setting}{preventProxyCache}) {
|
||||||
$params{"-expires"} = "-1d";
|
$params{"-expires"} = "-1d";
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ Defaults to "English". The language to retrieve the properties for.
|
||||||
|
|
||||||
=head3 propertyName
|
=head3 propertyName
|
||||||
|
|
||||||
If this is specified, only the value of the property will be returned, instead of the hash reference to all properties. The valid values are "charset", "toolbar", and "label".
|
If this is specified, only the value of the property will be returned, instead of the hash reference to all properties. The valid values are "toolbar" and "label".
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ sub process {
|
||||||
}
|
}
|
||||||
$var{'head.tags'} = '
|
$var{'head.tags'} = '
|
||||||
<meta name="generator" content="WebGUI '.$WebGUI::VERSION.'" />
|
<meta name="generator" content="WebGUI '.$WebGUI::VERSION.'" />
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset='.WebGUI::International::getLanguage($session{page}{languageId},"charset").'" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<script>
|
<script>
|
||||||
function getWebguiProperty (propName) {
|
function getWebguiProperty (propName) {
|
||||||
var props = new Array();
|
var props = new Array();
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ sub _get_rss_data {
|
||||||
if ($] >= 5.008 && $hasEncode) {
|
if ($] >= 5.008 && $hasEncode) {
|
||||||
$xml =~ /<\?xml.*?encoding=['"](\S+)['"]/i;
|
$xml =~ /<\?xml.*?encoding=['"](\S+)['"]/i;
|
||||||
my $xmlEncoding = $1;
|
my $xmlEncoding = $1;
|
||||||
my $encoding = WebGUI::International::getLanguage($session{page}{languageId},"charset");
|
my $encoding = "UTF-8";
|
||||||
if (lc($xmlEncoding) ne lc($encoding)) {
|
if (lc($xmlEncoding) ne lc($encoding)) {
|
||||||
eval { from_to($xml, $xmlEncoding, $encoding) };
|
eval { from_to($xml, $xmlEncoding, $encoding) };
|
||||||
WebGUI::ErrorHandler::warn($@) if ($@);
|
WebGUI::ErrorHandler::warn($@) if ($@);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ use strict;
|
||||||
|
|
||||||
our $LANGUAGE = {
|
our $LANGUAGE = {
|
||||||
label => 'English',
|
label => 'English',
|
||||||
charset => 'UTF-8',
|
|
||||||
toolbar => 'metal'
|
toolbar => 'metal'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue