Forum Discussion
ingard
Nimbostratus
Oct 20, 2008encoding query text from utf-8 to iso8859-1 (latin1)
Hi
I have a situation where i do some redirects to other partner websites based on hostname in an irule. To these websites I also pass a query string. However, one of the partner sites does not support utf-8 encoding, so I need to encode the query string to latin1/iso8859-1 before passing it to this particular site. I tried with something like this:
.
.
lets try to extract the query
regexp {q=(.+)} $uri -> q
if {[info exists q]} {
set qiso [encoding convertto latin-1 $q]
.
.
which gives me the following error:
TCL error: irule_abcsok_rewrites_1881 HTTP_REQUEST - invalid command name encoding while executing encoding convertto latin-1 $q
Any ideas?
regards
ingard
- hoolio
Cirrostratus
Hi ingard,when RULE_INIT { foreach cmd [lsort [info commands]] { log local0. " cmd: $cmd" } }
- ingard
Nimbostratus
Doh! whats the reason for disabling the encoding command? Would it be possible to enable it from the shell? If I can't make this work it would mean i'd have to send the requests to the webservers (again) - which would suck.. - hoolio
Cirrostratus
I'm not sure why it's disabled. Maybe a developer could explain the logic. Or you could open a case with F5 Support to find out why and ask for it to be supported in a future version.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects