Forum Discussion
ims_243721
Nimbostratus
Jan 15, 2016TCL encoding command not accepted
I need to encode variable with unicode
set uni_msg [URI::query [HTTP::uri] "msg"]
set en_msg [encoding convertto unicode $uni_msg]
Seems that F5 interpreter not accepting encoding TCL comm...
Hannes_Rapp
Nimbostratus
Jan 15, 2016To correct myself, here's a conversion to unicode. Any UNIX machines default to UTF-8 handling of unicode, that's the format you'll get with this iRule. Note that Windows handles unicode as UTF-16, and you may need to adjust it.
when HTTP_REQUEST {
binary scan [HTTP::uri] H* myvar
log local0. "TEST: Original URI [HTTP::uri] | UTF-8 unicode $myvar"
}
Jan 15 16:26:20 waf12 info tmm7[13448]: Rule /Common/test_encode : TEST: Original URI /helloworld?asd=1 | UTF-8 unicode 2f68656c6c6f776f726c643f6173643d31
It results the same in this text to UTF-8 converter tool: http://macchiato.com/unicode/convert.html
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