CharsetFilter
You can use this filter to convert the HTTP request query and body from one character set to another. If it is not possible to convert a body entirely, then the CharsetFilter tries to convert as much as possible, and replaces all non-convertible chars by a question mark ?
.
The CharsetFilter only handles requests of the content type application/x-www-form-urlencoded.
The filter has the following trace group: BC.Tracer.DebugProfile.IW4CharSetFlt
Classname
ch::nevis::isiweb4::filter::rewrite::CharsetFilter
Library
libRewriteFilters.so.1
ConvertFrom
- Type: string:
<Encoding>
- Usage Constraints: equired
- Default: basic
- Description: Defines the charset to convert from. I.E. "UTF-8".
ConvertTo
- Type: string:
<Encoding>
- Usage Constraints: required
- Default: basic
- Description: Defines the charset to convert to. I.E. "ISO-8859-1".
ConvertQuery
- Type: boolean
- Usage Constraints: optional
- Default: false
- Description: Converts the query if set to true.
ConvertBody
- Type: boolean
- Usage Constraints: optional
- Default: true
- Description: Converts the body if set to true.
IncomingCharsetStrategy
- Type: Enum: IGNORE, KEEP, CONVERT
- Usage Constraints: optional
- Default: CONVERT
- Description: Defines the conversion strategy for the body, if the incoming charset was set but differs from the one set in the attribute ConvertFrom. The following values are available:
- IGNORE: Ignore the incoming charset, always convert fromConvertFromtoConvertTo;
- KEEP: Keep the incoming charset, do not convert the body;
- CONVERT: Try to convert from the incoming charset toConvertTo.
You can find an example in the installed nevisProxy package (go to examples/various/CharsetFilter.example).