Branch: Tag:

2002-03-01

2002-03-01 10:55:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>

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 "åäö&#x829f;".
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.