Roxen.git/
server/
etc/
modules/
Roxen.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2002-03-01
2002-03-01 10:55:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>
668948e45b11b861d1b89ba5111ba0558b720d52 (
12
lines) (+
10
/-
2
)
[
Show
|
Annotate
]
Branch:
5.2
Fix for [bug
2790 (#2790)
].
Rev: server/etc/modules/Roxen.pmod:1.134
1:
// This is a roxen pike module. Copyright © 1999 - 2001, Roxen IS. //
-
// $Id: Roxen.pmod,v 1.
133
2002/
02
/
13
15
:
56
:
54
grubba Exp $
+
// $Id: Roxen.pmod,v 1.
134
2002/
03
/
01
10
:
55
:
58
grubba Exp $
#include <roxen.h> #include <config.h>
2071:
} }
+
static multiset(string) charset_warned_for = (<>);
+
function get_client_charset_decoder( string åäö, RequestID|void id ) //! Returns a decoder for the clients charset, given the clients //! encoding of the string "åäö芟".
2111:
return _charset_decoder(Locale.Charset.decoder("utf-7"))->decode; case "åäö":
+
case "åäö?":
case "åä": case "åäö\350\212\237": id && id->set_output_charset && id->set_output_charset( "utf-8" );
2132:
id && id->set_output_charset && id->set_output_charset( "shift_jis" ); return _charset_decoder(Locale.Charset.decoder("shift_jis"))->decode; }
-
report_warning( "Unable to find charset decoder for
åäö
==
%O\n",åäö);
+
if (!charset_warned_for[test] && (sizeof(charset_warned_for) < 256)) {
+
charset_warned_for[test] = 1;
+
report_warning( "Unable to find charset decoder for
%O,
vector:
%O\n",
+
åäö
, test
);
}
-
+
}
// Low-level C-roxen optimization functions.