All,
What's the expected behavior with non-ASCII characters in URLs. Let's
say I want to access a file named "äöü.txt" - My assumption was that
Zinc takes care of the UTF-8 -> 7bit (ASCII) -> Escape encoding. But
there is either something I don't understand or some manual steps I'm
missing.
The "straightforward" way doesn't work:
'http://myhost/path/with/umlaut/äöü.txt' asUrl.
"ZnCharacterEncodingError: ASCII character expected"
Although the actual encoding seems to be able to handle it (ignoring the
escapes slashes for the moment:
'http://myhost/path/with/umlaut/äöü.txt' urlEncoded.
"'http%3A%2F%2Fmyhost%2Fpath%2Fwith%2Fumlaut%2F%C3%A4%C3%B6%C3%BC.txt'"
Creating a URL from already escaped characters works as well:
'http://myhost/path/with/umlaut/%C3%A4%C3%B6%C3%BC.txt' asUrl.
"http://myhost/path/with/umlaut/%C3%A4%C3%B6%C3%BC.txt"
As does the decoding of such an URL:
'http://myhost/path/with/umlaut/%C3%A4%C3%B6%C3%BC.txt' urlDecoded.
"'http://myhost/path/with/umlaut/äöü.txt'"
At them moment I'm manually encoding UTF-8 characters in paths segments
before trying to build the URL. But is this the correct way?
Best Regards,
Udo