[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: document( URI ) with accented chars fails

Subject: Re: document( URI ) with accented chars fails
From: "Alexandre Hoïde alexandre.hoide@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Nov 2020 11:12:43 -0000
Re:  document( URI ) with accented chars fails
On Wed, Nov 18, 2020 at 12:16:01PM -0000, Martynas JuseviD
ius martynas@xxxxxxxxxxxxx wrote:
> We use this in bash scripts:
> 
> urlencode()
> {
>     python -c 'import urllib, sys; print urllib.quote(sys.argv[1] if
> len(sys.argv) > 1 else sys.stdin.read()[0:-1])' "$1"
> }

  Hello and thanks for the alternative solution Martynas !

  Using python@xxxxx and python-urllib3@xxxxxx I had to addapt
your function like this:

~~~{bash script}
urlencode()
{
  python3 -c 'from urllib.parse import quote, sys; print (quote(sys.argv[1]) if len(sys.argv) > 1 else sys.stdin.read()[0:-1])' "$1"
}

Best regards,
Alexandre HoC/de

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.