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:
HTTP::respond 200 content [ifile get web_page] "Content-Type" "text/html;charset=utf-8"
I have right result and my cyrillic text displayed correct. But if I want to process variables and use constructions like:
set web_page [subst -nobackslashes [ifile get web_page]]
...
HTTP::respond 200 content $web_page "Content-Type" "text/html;charset=utf-8"
my variables work correct, but instead cyrillic words I see something like "К Ñ�ожÐ". I sniff both metod by WireShark and notice that octal codes of chars are difference. For example, in first case I have:
\320\240\320\265\321\201\321\203\321\200\321\201...\r\n
But in second case same string:
\303\220\302\240\303\220\302\265\303\221\302\201...\r\n
Someone has an idea?
Thank you!