apr_pool_t *pool;
- DBG(r,"start chxj_encoding()");
+ DBG(r,"REQ[%X] start chxj_encoding()", (unsigned int)(apr_size_t)r);
dconf = chxj_get_module_config(r->per_dir_config, &chxj_module);
ibuf = apr_palloc(pool, ilen+1);
if (ibuf == NULL) {
ERR(r, "runtime exception: chxj_encoding(): Out of memory.");
+ DBG(r,"REQ[%X] end chxj_encoding()", (unsigned int)(apr_size_t)r);
return (char *)src;
}
memset(ibuf, 0, ilen+1);
mod_chxj_config *dconf;
chxjconvrule_entry *entryp;
- DBG(r,"start chxj_rencoding()");
+ DBG(r,"REQ[%X] start chxj_rencoding()", (unsigned int)(apr_size_t)r);
if ((int)*len < 0) {
ERR(r, "runtime exception: chxj_rencoding(): invalid string size.[%d]", (int)*len);
+ DBG(r,"REQ[%X] end chxj_rencoding()", (unsigned int)(apr_size_t)r);
return (char *)apr_pstrdup(r->pool, "");
}
dconf = chxj_get_module_config(r->per_dir_config, &chxj_module);
if (! dconf) {
- DBG(r,"none encoding.");
- DBG(r,"end chxj_rencoding()");
+ DBG(r,"REQ[%X] none encoding.", (unsigned int)(apr_size_t)r);
+ DBG(r,"REQ[%X] end chxj_rencoding()", (unsigned int)(apr_size_t)r);
return (char*)src;
}
entryp = chxj_apply_convrule(r, dconf->convrules);
if (! entryp->encoding) {
- DBG(r,"none encoding.");
- DBG(r,"end chxj_rencoding()");
+ DBG(r,"REQ[%X] none encoding.", (unsigned int)(apr_size_t)r);
+ DBG(r,"REQ[%X] end chxj_rencoding()", (unsigned int)(apr_size_t)r);
return (char*)src;
}
if (STRCASEEQ('n','N',"none", entryp->encoding)) {
- DBG(r,"none encoding.");
- DBG(r,"end chxj_rencoding()");
+ DBG(r,"REQ[%X] none encoding.", (unsigned int)(apr_size_t)r);
+ DBG(r,"REQ[%X] end chxj_rencoding()", (unsigned int)(apr_size_t)r);
return (char*)src;
}
ilen = *len;
ibuf = apr_palloc(r->pool, ilen+1);
if (! ibuf) {
- DBG(r,"end chxj_rencoding()");
+ DBG(r,"REQ[%X] end chxj_rencoding()", (unsigned int)(apr_size_t)r);
return (char*)src;
}
olen = ilen * 4 + 1;
spos = obuf = apr_palloc(r->pool, olen);
if (! obuf) {
- DBG(r,"end chxj_rencoding()");
+ DBG(r,"REQ[%X] end chxj_rencoding()", (unsigned int)(apr_size_t)r);
return ibuf;
}
DBG(r,"encode convert [%s] -> [%s]", "CP932", entryp->encoding);
if (EINVAL == errno) {
ERR(r, "The conversion from %s to %s is not supported by the implementation.", "CP932", entryp->encoding);
}
- DBG(r,"end chxj_rencoding()");
+ DBG(r,"REQ[%X] end chxj_rencoding()", (unsigned int)(apr_size_t)r);
return ibuf;
}
*len = strlen(spos);
iconv_close(cd);
- DBG(r,"end chxj_rencoding() len=[%d] obuf=[%.*s]", (int)*len, (int)*len, spos);
+ chxj_dump_string(r, APLOG_MARK, "RESULT Convert REncoding", spos, *len);
+ DBG(r,"REQ[%X] end chxj_rencoding()", (unsigned int)(apr_size_t)r);
return spos;
}