Platforms to show: All Mac Windows Linux Cross-Platform

EncodingToURLMBS(s as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 2.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a string with URL escaped characters.
Example
msgbox EncodingToURLMBS("Wie geht's?")

Encodings a string for an URL. Use with UTF8 or ISO-9660 encoded strings. This function does not work correctly with UTF16 strings.

e.g. "Wie geht's?" -> "Wie%20geht's%3F"

May return "" on low memory conditions.
Strings and encoding work only perfectly for RB 4.5 or newer.
Added Linux support in v5.1.

See also:

Some examples using this global method:

EncodingToURLMBS(s as string, options as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 4.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a string with URL escaped characters.
Example
dim s as string = "20101210 1244 - Sky Cinema +24 - Wen die Geister lieben"

MsgBox EncodingToURLMBS(s)

// gives: 20101210%201244%20-%20Sky%20Cinema%20+24%20-%20Wen%20die%20Geister%20lieben

MsgBox EncodingToURLMBS(s,1)

// gives: 20101210+1244+-+Sky+Cinema+%2B24+-+Wen+die+Geister+lieben

MsgBox EncodingToURLMBS(s,2)

// gives: 20101210%201244%20-%20Sky%20Cinema%20%2b24%20-%20Wen%20die%20Geister%20lieben

Encodings a string for an URL. Use with UTF8 or ISO-9660 encoded strings. This function does not work correctly with UTF16 strings.

e.g. "Wie geht's?" -> "Wie%20geht's%3F"

May return "" on low memory conditions.
Strings and encoding work only perfectly for RB 4.5 or newer.

Pass 1 for the options parameter to get PHP/Perl compatible output (+ instead of spaces and %20 for spaces).
Pass 2 for the options parameter to get plus to %2B and space to %20. Added in plugin version 10.6.

See also:

Some examples using this global method:

Blog Entries

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...