1

I am looking for a way of encoding a byte array to be representable in an URL from a procedure written in Oracle/PLSQL. It is important that the representation/encoding does not conflict with the reserved characters in an URL, like: +, /, and =.

A possible solution could be an equivalent of .NET's HttpServerUtility.UrlTokenEncode to use for "safe" URL encoding of a given byte array.

I have been searching for a while now without any luck.

Thanks in advance.

2
  • 1
    Does it need to be base64-encoded, or are you just looking for utl_url.escape? Commented May 2, 2014 at 22:32
  • @AlexPoole I would prefer a solution like the one that is possible in .NET - that is base64 encoding which is "safe" to use in the URL. Commented May 3, 2014 at 13:13

1 Answer 1

0

You can encode the byte array to base64. Here is a way to perform this with the UTL_ENCODE package: https://stackoverflow.com/a/12802685/2069555

Sign up to request clarification or add additional context in comments.

1 Comment

Won't work since the base64 character set contains characters reserved in the URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.