From e1d917182c1953b16b32a39ed2fe38e3d0823047 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Sat, 20 Sep 2025 23:19:32 +0200 Subject: Add support for base64url encoding and decoding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds support for base64url encoding and decoding, a base64 variant which is safe to use in filenames and URLs. base64url replaces '+' in the base64 alphabet with '-' and '/' with '_', thus making it safe for URL addresses and file systems. Support for base64url was originally suggested by Przemysław Sztoch. Author: Florents Tselai Reviewed-by: Aleksander Alekseev Reviewed-by: David E. Wheeler Reviewed-by: Masahiko Sawada Reviewed-by: Daniel Gustafsson Reviewed-by: Chao Li (Evan) Discussion: https://postgr.es/m/70f2b6a8-486a-4fdb-a951-84cef35e22ab@sztoch.pl --- doc/src/sgml/func/func-binarystring.sgml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/func/func-binarystring.sgml b/doc/src/sgml/func/func-binarystring.sgml index 78814ee0685..9bab965f288 100644 --- a/doc/src/sgml/func/func-binarystring.sgml +++ b/doc/src/sgml/func/func-binarystring.sgml @@ -728,6 +728,7 @@ Encodes binary data into a textual representation; supported format values are: base64, + base64url, escape, hex. @@ -785,6 +786,24 @@ + + base64url + + base64url format + + + + The base64url format is that of + + RFC 4648 Section 5, a base64 variant safe to + use in filenames and URLs. The base64url alphabet + use '-' instead of '+' and + '_' instead of '/' and also omits + the '=' padding character. + + + + escape -- cgit v1.2.3