FCLT#88579 Facilitor utf-8 ondersteuning

svn path=/Website/trunk/; revision=69936
This commit is contained in:
Jos Groot Lipman
2025-08-06 12:55:12 +00:00
parent 916cbb4eee
commit ff2f2f5a31
4 changed files with 55 additions and 33 deletions

View File

@@ -105,7 +105,7 @@ if (Session("interface") == "desktop") { // normale desktop interface
<head>
<%=S("http_meta_head")%>
<title><%=L("lcl_facilitor_ie_title")%></title>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1252">
<meta http-equiv="Content-Type" content="text/html;charset=<%=isutf8()?"utf-8":"windows-1252"%>">
<link rel="shortcut icon" type="image/x-icon" href="<%= rooturl + "/" + S("fac_favicon_folder") %>/favicon.ico" />
<link rel="apple-touch-icon" href="<%= rooturl + "/" + S("fac_favicon_folder") %>/Icon.png" />
<link rel="apple-touch-icon" sizes="57x57" href="<%= rooturl + "/" + S("fac_favicon_folder") %>/Icon-57x57.png" />

View File

@@ -224,37 +224,40 @@ function serializeObj(obj) {
return arr.join("&");
}
jQuery.extend({
param: function(a) {
var s = [];
// If an array was passed in, assume that it is an array
// of form elements
if (a.constructor == Array || a.jquery) {
// Serialize the form elements
jQuery.each(a, function() {
s.push(myEncode(this.name) + "=" + myEncode(this.value));
});
}
// Otherwise, assume that it's an object of key/value pairs
else {
// Serialize the key/values
for (var j in a)
// If the value is an array then the key names need to be repeated
if (a[j] && a[j].constructor == Array)
jQuery.each(a[j], function() {
s.push(myEncode(j) + "=" + myEncode(this));
});
else
s.push(myEncode(j) + "=" + myEncode(a[j]));
}
// Return the resulting serialization
return s.join("&").replace(/ /g, "+");
},
if (document.characterSet != 'UTF-8')
{
jQuery.extend({
param: function(a) {
var s = [];
// If an array was passed in, assume that it is an array
// of form elements
if (a.constructor == Array || a.jquery) {
// Serialize the form elements
jQuery.each(a, function() {
s.push(myEncode(this.name) + "=" + myEncode(this.value));
});
}
// Otherwise, assume that it's an object of key/value pairs
else {
// Serialize the key/values
for (var j in a)
// If the value is an array then the key names need to be repeated
if (a[j] && a[j].constructor == Array)
jQuery.each(a[j], function() {
s.push(myEncode(j) + "=" + myEncode(this));
});
else
s.push(myEncode(j) + "=" + myEncode(a[j]));
}
// Return the resulting serialization
return s.join("&").replace(/ /g, "+");
},
serialize: function() {
return this.param(this.serializeArray());
}
});
serialize: function() {
return this.param(this.serializeArray());
}
});
}
// Voormalig jquery.autogrow-textarea.js
(function($) {

View File

@@ -93,8 +93,17 @@ if (typeof DBUPGRADE == "undefined" && fso.FileExists(upgrade_script))
<%
// NLS_LANG moet altijd op de webserver op WE8MSWIN1252
Response.Codepage = 1252;
Response.Charset = 'windows-1252';
if (isutf8())
{
Response.Codepage = 65001;
Response.Charset = 'utf-8';
}
else
{
Response.Codepage = 1252;
Response.Charset = 'windows-1252';
}
if (JSON_Result)
Response.ContentType = "application/json";

View File

@@ -128,6 +128,11 @@ settings =
Application("SET_" + customerId + "_DB_SCHEMA") = oRs("fac_version_schema").Value;
oRs.Close();
var oRs = Oracle.Execute("SELECT value FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET'");
Application("SET_T_DB_CHARSET") = "string"; // Is voor alle klanten gelijk
Application("SET_" + customerId + "_DB_CHARSET") = oRs("value").Value;
oRs.Close();
// Settings cachen.
// Voor defaults delen we de waarde over alle klanten.
var sql = "SELECT fac_setting_name,"
@@ -347,4 +352,9 @@ function S(s, defval)
{
return settings.get_setting(s, defval)
}
function isutf8()
{
return S("DB_CHARSET") == 'AL32UTF8';
}
%>