Encode to URL (UTF-8, Perl Notation)

I am trying to convert URLs which include special letters like “ü” to an UTF8 (Perl Notation) URL. But EncodeURLComponent and EncodingToURLMBS are not working like i expected it.

Both encode the ü to %FC which is correct in ISO8859, but i need the ü encoded to %C3%BC (Hexadecimal Notation?).

Am i doing it wrong?

ah when its unicode it should encode the BYTES (C3 BC) not the code point (FC)

seems the RFC 3986 isnt being implemented properly
https://tools.ietf.org/html/rfc3986#page-11

[quote=485342:@Norman Palardy]ah when its unicode it should encode the BYTES (C3 BC) not the code point (FC)

seems the RFC 3986 isnt being implemented properly
https://tools.ietf.org/html/rfc3986#page-11[/quote]

Should i report it via Feedback? And is there a known workaround? Could not find anything in the Forum/Manuals.

Hm… Xojo 2019 r3.1 on macOS 10.14.6

Var url As String = "xojo.com/ü/bla" Me.AddText "Url: " + url + EndOfLine Me.AddText EncodeURLComponent(url) + EndOfLine

I get the result

[quote]Url: xojo.com/ü/bla
xojo.com%2F%C3%BC%2Fbla[/quote]

Are you sure that there is no Encoding issue in your code?

I do

EncodingToURLMBS(App.Kunde.LastName, 1)

or

EncodeURLComponent(App.Kunde.LastName)

( App.Kunde.LastName is a UTF-8 Encoded String )

But i am working on Windows 10 (64bit).

Well, try a hard coded string which is by definition UTF8 to be sure…

But you were correct, @Thomas Eckert :slight_smile:
One of my Data Fields was without an Encoding (h021 in Xojo Editor Debugger).
After changing everything to really be in UTF-8, it works like a charm.

Thank you :slight_smile:

Glad to help.