Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - Français


url_encode

Encode URL strings using CURL.

Syntax

encoded = url_encode(Strings)

Arguments

Strings
Any single string or regular array of strings that needed to be encoded before using http_ functions.

encoded
Array of strings. Its sizes match Strings ones.

Description

url_encode(Strings) uses the CURL parser to performs URL conversion for each element of Strings.

Examples

url_encode(["€T%Â" ; "µДزあ字"])
url_encode(["+-._~ ", "0123456789" ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz"])
--> url_encode(["€T%Â" ; "µДزあ字"])
 ans  =
 "%E2%82%ACT%25%C3%82"                 
 "%C2%B5%D0%94%D8%B2%E3%81%82%E5%AD%97"

--> url_encode(["+-._~ " "0123456789" ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz"])
 ans  =
 "%2B-._~%20"                  "0123456789"                
 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"  "abcdefghijklmnopqrstuvwxyz"

See also

  • url_decode — Decode encoded URL strings using CURL.
  • http_get — HTTP GET request.
  • url_split — Split an URL (HTTP, HTTPS, FTP...)
  • ascii — string ASCII conversions
  • dec2hex — représentation hexadécimale d'un entier

History

VersionDescription
2024.0.0 url_encode() added to the webtools module.
Report an issue
<< url_decode Outils web url_split >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 24 11:16:04 CEST 2024