tufanv Expert Licensed User Longtime User Oct 9, 2018 #1 Hello, I want to encodeurl this string to share a text with whatsapp : For example : "Avro / TL" The correct encoded string is : "Avro+%2F+TL" but I use the below code but get : "Avro+%2F+TL" instead of the above correct encoded url: Code: Copy txt="Avro / TL" txt=su.EncodeUrl(txt,"UTF8") LogColor(txt,Colors.Red) Dim url As String = "whatsapp://send?text=" & txt what am i missing here ?
Hello, I want to encodeurl this string to share a text with whatsapp : For example : "Avro / TL" The correct encoded string is : "Avro+%2F+TL" but I use the below code but get : "Avro+%2F+TL" instead of the above correct encoded url: Code: Copy txt="Avro / TL" txt=su.EncodeUrl(txt,"UTF8") LogColor(txt,Colors.Red) Dim url As String = "whatsapp://send?text=" & txt what am i missing here ?
Erel B4X founder Staff member Licensed User Longtime User Oct 9, 2018 #2 "Avro+%2F+TL" "Avro+%2F+TL" I don't see any difference between the two strings. Upvote 0
tufanv Expert Licensed User Longtime User Oct 9, 2018 #3 Erel said: "Avro+%2F+TL" "Avro+%2F+TL" I don't see any difference between the two strings. Click to expand... sorry I pasted the wrong log. My code gives this : "Avro%20%2F%20TL" but it must be : "Avro+%2F+TL" Upvote 0
Erel said: "Avro+%2F+TL" "Avro+%2F+TL" I don't see any difference between the two strings. Click to expand... sorry I pasted the wrong log. My code gives this : "Avro%20%2F%20TL" but it must be : "Avro+%2F+TL"
Erel B4X founder Staff member Licensed User Longtime User Oct 9, 2018 #4 %20 is a valid replacement to space. You can replace it to +: Code: Copy txt=su.EncodeUrl(txt,"UTF8").Replace("%20", "+") Upvote 0
%20 is a valid replacement to space. You can replace it to +: Code: Copy txt=su.EncodeUrl(txt,"UTF8").Replace("%20", "+")