diff options
author | Günther Deschner <gd@samba.org> | 2004-10-01 22:24:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:52 -0500 |
commit | b2dc329d437603e525609b101ecced7f0c5b19cd (patch) | |
tree | 856eeba748a3fdb31b4613262110bf55c03e50f2 /source3/web/cgi.c | |
parent | 13720fbb3e4f68fc88c1ae50812273d7a9a79c64 (diff) | |
download | samba-b2dc329d437603e525609b101ecced7f0c5b19cd.tar.gz samba-b2dc329d437603e525609b101ecced7f0c5b19cd.tar.bz2 samba-b2dc329d437603e525609b101ecced7f0c5b19cd.zip |
r2771: Second (and last) part of Swat-i18n-Patch from Björn Jacke
<bjacke@sernet.de>
"Do not use display charset for swat output. In HTML we do not care
about the "locale charmap" because HTML code is UTF-8 only now.
Additionally take care that we convert files from statuspage from unix
charset to UTF-8. Thus we have correct HTML output under all
circumstances. We now also convert the share names correctly from unix
encoding to web encoding and vice vera. "
Guenther
(This used to be commit 6d9f77c2bb95db4939b8ef375e22b188168b70ab)
Diffstat (limited to 'source3/web/cgi.c')
-rw-r--r-- | source3/web/cgi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c index b1aa8ae754..93731d1d3f 100644 --- a/source3/web/cgi.c +++ b/source3/web/cgi.c @@ -196,18 +196,18 @@ void cgi_load_variables(void) printf("<!== End dump in cgi_load_variables() ==>\n"); #endif - /* variables from the client are in display charset - convert them - to our internal charset before use */ + /* variables from the client are in UTF-8 - convert them + to our internal unix charset before use */ for (i=0;i<num_variables;i++) { pstring dest; - convert_string(CH_DISPLAY, CH_UNIX, + convert_string(CH_UTF8, CH_UNIX, variables[i].name, -1, dest, sizeof(dest), True); free(variables[i].name); variables[i].name = strdup(dest); - convert_string(CH_DISPLAY, CH_UNIX, + convert_string(CH_UTF8, CH_UNIX, variables[i].value, -1, dest, sizeof(dest), True); free(variables[i].value); @@ -334,11 +334,11 @@ static BOOL cgi_handle_authorization(char *line) } *p = 0; - convert_string(CH_DISPLAY, CH_UNIX, + convert_string(CH_UTF8, CH_UNIX, line, -1, user, sizeof(user), True); - convert_string(CH_DISPLAY, CH_UNIX, + convert_string(CH_UTF8, CH_UNIX, p+1, -1, user_pass, sizeof(user_pass), True); |