Forum Discussion
ashilkin_177320
Aug 20, 2015Nimbostratus
Web page in iFile over HTTP::respond content
Hi all!
I have a strange situation. I have a html page in iFile storage. The page has cyrillic text and I return this page to clients by HTTP::respond content in iRule. If I use construction like:
...
ashilkin_177320
Nimbostratus
Deckard, Thank you for help, but unfortunately it doesn't work in my case. Thanks for F5 support, they found solution - for my case, I should use following construction for generating binary string rather than UTF-8 encoding:
set web_page [ binary format a* [subst -nobackslashes [ifile get web_page]]]
...
HTTP::respond 200 content $web_page "Content-Type" "text/html;charset=utf-8"
For details - https://www.tcl.tk/man/tcl8.4/TclCmd/binary.htm
Ping_Xiong_1567
Jun 09, 2018Historic F5 Account
This is really cool, I can handle Chinese characters with the ifile.
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