On Fri, May 17, 2002 at 07:04:56PM +1200, martin langhoff wrote:
> What I am looking for:
>
> I need to hack into the standard behaviour of the "inline variable
> display modifiers" that are builtin, also known as "filters". These
> filters are apparently calling PHP's htmlentities() or an equivalent and
> I need to change the encoding parameter to UTF-8.
>
> What have I currently found
>
> I have found some code in midgard-lib/src/format.c that looks like
>
> static int mgd_parser_std_u(mgd_parser * parser, void *data)
> {
> const char *str;
> for (str = (const char *) data; str && *str; str++)
> if (*str == '\n')
> mgd_parser_addstr(parser, "%0D%0A");
> else if (isalnum(*str))
> mgd_parser_addchar(parser, *str);
> else {
> mgd_parser_addchar(parser, '%');
> mgd_parser_addchar(parser,
> mgd_parser_HexTable[
> (((unsigned
> char)
> *str) &
> 0xF0) >>
> 4]);
> mgd_parser_addchar(parser,
>
> mgd_parser_HexTable[((unsigned char)
> *str) &
> 0x0F]);
> }
> return 1;
> }
>
> and I'd hope that someone tells me that
>
> A - this is not really the code that does it!
>
> or
>
> b - there is a nice and clean way of calling something smarter that
> mgd_parser_HexTable() -- which is pretty limited and is currently
> scrambling my content big time.
Hmm... May be I didn't understand you clean, but why you wan't use
'user defined formatters' (UDF)?
--
Regards,
Sergei Dolmatov.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]