Bernard, I understand the issue, but this is not so easy to fix.
I must start by saying that encoding a (part of) a URL with anything but UTF-8 is wrong (how would the receiver know, unless you have a mutual external agreement). So I guess you must be using some old web service. The solution is to make your own ZnUrl subclass and overwrite #encodePath:on: Then you just instanciate your subclass from elementary parts (no encoding) and pass it to ZnClient>>#url: as an object, not a string. Mind you, I haven't tried this yet. Sven > On 28 Jun 2016, at 20:26, Bernhard Pieber <[email protected]> wrote: > > I have a web service where I have to use a URL with percent-encoded (URL > encoded) special characters – German Umlauts – but not using UTF8 but > ISO-8859-1. I have been given the following table for the „correct“ > encodings: http://www.degraeve.com/reference/urlencoding.php > > I found out that I can use the following to get the encoding I need (%FC): > ZnPercentEncoder new > characterEncoder: (ZnCharacterEncoder newForEncoding: 'iso-8859-1'); > encode: 'ü'. > > However, when I try to use the encoded URL with ZnClient > ZnClient new > url: 'http://example.com/%FC'; > get. > > I get a ZnUTF8Encoder>>errorIllegalLeadingByte (Illegal leading byte for > utf-8 encoding). > > Any help is greatly appreciated. > > Cheers, > Bernhard > > > >
