Roxen.git / server / modules / tags / writefile.pike

version» Context lines:

Roxen.git/server/modules/tags/writefile.pike:3:   // <srb@cuci.nl>   //   // See COPYING in the server directory for license information.   //      //<locale-token project="mod_writefile">_</locale-token>   #define _(X,Y) _DEF_LOCALE("mod_writefile",X,Y)   #define _ok id->misc->defines[" _ok"]      constant cvs_version = -  "$Id: writefile.pike,v 1.22 2009/05/26 14:20:25 mast Exp $"; +  "$Id$";   constant thread_safe = 1;      #include <module.h>   #include <config.h>      inherit "module";         // ---------------- Module registration stuff ----------------   
Roxen.git/server/modules/tags/writefile.pike:167:    if (charset == "utf8")    towrite = string_to_utf8 (towrite);    else if (charset == "iso106461")    towrite = string_to_unicode (towrite);    else if (charset == "iso88591" && String.width (towrite) == 8) {    // Nothing to do.    }       else {    string charset = args->charset || "iso-8859-1"; -  Locale.Charset.Encoder enc; -  if (mixed err = catch (enc = Locale.Charset.encoder (charset))) +  Charset.Encoder enc; +  if (mixed err = catch (enc = Charset.encoder (charset)))    if (has_prefix (describe_error (err), "Unknown character encoding"))    parse_error ("Unknown charset %O.\n", charset);    else    throw (err);    enc->set_replacement_callback (    args["encode-with-entities"] ?    lambda (string chr) {    return sprintf ("&#x%x;", chr[0]);    } :    lambda (string chr) {