Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP::payload collection mangling UTF-8 characters

Peter_Lowdon
Altocumulus
Altocumulus

hi f5'ers,

The HTTP::payload command doesn' seem to ba able to handle UTF-8 encoded characters.  When I capture the HTTP payload into a variable and then manipulate it and update the HTTP payload before sending the request into our application names any unicode characters are being mangled, so "Héro" becomes "Héro".

I've tried creating a simple HTTP virtual server with an iRule that just logs the HTTP payload in /var/log/ltm and I can see its not our application that is causing the issue, it appears to be the HTTP::payload feature.

I saw an article about using binary scan to fix a similar issue but when I tried it it didn't make any difference at all.

Help me f5'ers, you're my only hope!

 

2 REPLIES 2

Hello Peter, 

Have you tried this?

"Note that the argument will be interpreted as a byte array. If it is actually a UTF-8 string with multibyte characters, the output will not be what you expect. In order to prepare a UTF-8 string for use as input to HTTP::payload replace, you should first run ‘binary scan c* throwawayvariable’."

REF - https://clouddocs.f5.com/api/irules/HTTP__payload.html

This could also help:

https://support.f5.com/csp/article/K22406348

 

Regards,
Dario.

Leslie_Hubertus
Community Manager
Community Manager

Hi @Peter_Lowdon  - did @Dario_Garrido's reply help solve your issue? If yes, don't forget to click Accept as Solution so others know that is the correct answer - and if no, then I'll see about finding a SME to help you out. 🙂