Forum Discussion

mikand_61525's avatar
mikand_61525
Icon for Nimbostratus rankNimbostratus
Nov 22, 2008

URI::decode and unicoded characters

When using URI::decode to filter uri-requests it seems like unicode characters such as C3%B6 (which is letter "ä") gets decoded into the two characters "├Â" instead of being kept as is.

 

 

Is there a way to after an uri has been decoded to encode it again but only the unicode stuff?

 

 

Because I assume I could solve this by using a string map to manually convert "├Â" into C3%B6 but there might exist other unicode characters so it would be nice if there existed some kind of URI::encode_unicode, perhaps there already is?

 

 

Maybe somebody on this forum already stumbled into this problem previously and has a nifty solution? :-)

3 Replies

  • Hi there,

     

     

    If you don't get a valid suggestion here, you could open a case with F5 Support and find out if there is a workaround. You could open a 'request for enhancement' at the same time requesting better handling for UTF8 characters within the URI::decode/encode functions.

     

     

    Aaron
  • It seems like the TCL engine (used for irules by F5) will automagically turn any char that starts with %3C into a unicode character internally. This means that running "string map" and searching for %3C simply just wont work since the %3C character has been converted into some other combination.

     

     

    So once I figured out the codings (thanks to http://dimsboiv.uqac.ca/index_addon/utf-8.html) I could manually handle the missing characters.

     

     

    But yes it would be better if the URI::decode function could do this for you.

     

     

    Is it possible to contact the F5 support without first register an account?
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    I think if you want to send in a ticket you'll have to register first so they can contact you back and link other tickets you might create together.

     

     

    Colin