pike.git/
lib/
master.pike.in
Branch:
Tag:
Non-build tags
All tags
No tags
2006-01-19
2006-01-19 21:19:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>
bd8e1a13b9865fa8d1d281025609725c390147d0 (
15
lines) (+
8
/-
7
)
[
Show
|
Annotate
]
Branch:
7.9
decode_charset() should now work again.
Rev: lib/master.pike.in:1.383
6:
// Pike is distributed under GPL, LGPL and MPL. See the file COPYING // for more information. //
-
// $Id: master.pike.in,v 1.
382
2006/01/
14
18
:19:
19
nilsson
Exp $
+
// $Id: master.pike.in,v 1.
383
2006/01/
19
21
:19:
52
grubba
Exp $
#pike __REAL_VERSION__ //#pragma strict_types
2932:
}
-
static object
_charset_mod
;
+
static object
Charset
;
//! This function is called by cpp() when it wants to do //! character code conversion. string decode_charset(string data, string charset) {
-
if (!
_charset_mod
) {
+
if (!
Charset
) {
object mod = [object]resolv("Locale");
-
_charset_mod
= [object](mod && mod["Charset"]);
-
if (!
_charset_mod
)
-
compile_cb_error
("Cannot handle charset - no Locale.Charset module found.");
+
Charset
= [object](mod && mod["Charset"]);
+
if (!
Charset
)
+
compile_cb_error("Cannot handle charset - no Locale.Charset module found.");
} if (mixed err = catch {
-
object decoder = ([function(string:object)]
_charset_mod->
decoder)(charset);
+
object decoder = ([function(string:object)]
Charset.
decoder)(charset);
return ([function(void:string)]([function(string:object)]decoder-> feed)(data)->drain)(); })