My Oracle Support Banner

UTL_ENCODE.BASE64_ENCODE Returns Different Results In SQL And PL/SQL (Doc ID 1332488.1)

Last updated on DECEMBER 16, 2019

Applies to:

PL/SQL - Version 10.2.0.5 to 11.2.0.2 [Release 10.2 to 11.2]
Information in this document applies to any platform.

Goal

Why does utl_encode.base64_encode produce different results in PLSQL and SQL?

(UTL_ENCODE is used when you have binary data that you want to transfer across the network. If you just stream this in it's raw format some protocols may interpret the binary data as control characters or character combinations and may act on this. To get around this, the binary data is encoded into characters using UTL_ENCODE.)

For example, from PL/SQL:


TEST
-----------------
VEVTVA==

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.