---
name: "urlcoding"
section: "3"
platform: "linux"
package: "libbash"
version: "0.9.11-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/urlcoding"
---

# urlcoding(3)

a Libbash library for encoding and decoding URL's.

## NAME

**urlcoding** – a Libbash library for encoding and decoding URL's.

## SYNOPSIS

- **urlEncodeString** \[*-l*\] ⟨*STRING*⟩

  - **urlEncodeFile** \[*-l*\] ⟨*FILE*⟩

  - **urlEncodeStream** \[*-l*\]

  - **urlDecodeString** ⟨*STRING*⟩

  - **urlDecodeFile** ⟨*FILENAME*⟩

  - **urlDecodeStream**

  ## DESCRIPTION

**urlcoding** is a collection of functions that convert ASCII-text to standard URL's and vice-versa. The AWK code used is based on code by Heiner Steven \<heiner.steven@odn.de\>

The function list:

- **urlEncodeString**

  Creates a URL from an ASCII string

- **urlEncodeFile**

  Converts a file into URL-valid text

- **urlEncodeStream**

  Converts standard input into URL-valid text

- **urlDecodeString**

  Converts a URL-encoded text back to a plain-text form

- **urlDecodeFile**

  Coverts URL-encoded text in a file back to plain text

- **urlDecodeStream**

  Converts URL-encoded standard input to text

Detailed interface description follows.

The  \[*-l*\] option for the encoding functions should be used when line-feed characters ('\\n') are to be encoded as well.

All functions print the results of their conversions to standard output.

The exit status of all functions is that of the command 'awk', with '0' for success

## FUNCTIONS DESCRIPTIONS

### Cm urlEncodeString Bo Ns Fa -l Ns Bc Aq Ns Fa STRING Ns

Converts  *STRING* - a string of ASCII characters - to URL.

### Cm urlEncodeFile Bo Ns Fa -l Ns Bc Aq Ns Fa FILE Ns

Coverts  *FILE* of URL-encoded text to plain text

### Cm urlEncodeStream Bo Ns Fa -l Ns Bc

Converts text from standard input to URL-text.

### Cm urlDecodeString Aq Ns Fa STRING Ns

Converts URL-encoded string *STRING* back to text.

### Cm urlDecodeFile Aq Ns Fa FILENAME Ns

Converts the URL-encoded text in  *FILE* to plain text.

### Cm urlDecodeStream

Converts the URL-encoded text from standard input to plain-text

## AUTHORS

Alon Keren ⟨alon.keren@gmail.com⟩

## SEE ALSO

[ldbash(1)](/ldbash/1.md), libbash(1)
