Transmitting newline character "\n" - url

Given the following URL (working, try it!)
https://select-test.wp3.rbsworldpay.com/wcc/purchase?instId=151711&cartId=28524&currency=GBP&amount=1401.49&testMode=100&name=Tom%20Gul&address=24%20House%20Road\nSome
Place\nCounty&postcode=TR33%20999&email=email#mail.com&country=GB
If you click on the link and go through to the payment page, the address in the address box is not displaying properly, the newline characters are displaying as text.
I've tried passing through <br />'s but no luck, anyone got any ideas? I need to get the address to display with newlines.
Commas are OK as a separator but i would much prefer being able to have newlines. Thanks for any help! A working example will be the accepted answer.

Try using %0A in the URL, just like you've used %20 instead of the space character.

Try to replace the \n with %0A just like you have spaces replaced with %20.

Use %0A (URL encoding) instead of \n (C encoding).

late to the party, but if anyone comes across this, javascript has a encodeURI method

Replace the \n with %0A.
That's all.

Related

UIActivityViewController Gmail share extension duplicated body

I've seen some weird thing with the gmail share extension, like the body and the subject fields are empty if you want to share a content containing a & character.
It's possible to get it working with escaping the & character with &, however this way the body in the message is duplicated (once the original, and once the escaped.
Do you guys know a workaround for this issue?
Thanks in advance!
The only workaround I've found is to remove every special characters (I was able to replace & with 'and' - it was in text, not in link)

How to fix encoding issues ? (NSString / XMLParsing)

I parsed an XML file containing UTF8/latin characters (é, â, è, î, etc...).
At first I tried to fix this with a function replacing the wrong chars. But I'm having a problem with à, replaced by ".
And as I don't want to replace all the " of my file, I have to find another way to fix it.
Any idea to fix this ?
Thanks a lot for your advices
To finally answer this question, it worked using TBXML. But only with UTF-8 encoding, not ISO-8859-1.

how to pass URL with whitespace in Chrome and IE or include whitespace without encode?

I have a url to pass on my website that have whitespace. what thing i should done that chrome and IE never encode them. suppose
Mywebsite.com/search/ASP.NET MVC 2
IE and chrome fill whitespace with %20 how i can stop them to do this type of things.
You can replace the whitespace with "_" - this is a pretty normal case. But you will probably not be able to keep your spaces.
Whitespaces are not allowed in URLs. That is why they can automatically encoded by some browser if you call that page directly.
What's the problem with that encoding on the receiver side? Just decode the data or (if you are sure there were only whitespaces) just replace all %20 with a whitespace.

How do I show non-standard characters in the address bar?

I have a bugging problem. For a website I made there are search engine friendly URL's generated. The only problem is there are ß-chars in the url too. Chars like ö, ï, ä, ü etc. are placed correct. But with the ß-char there is a diamond-icon with a questionmark in it.
I thought it had to do with the charset which is used but i've tried both UTF-8 and iso-8859-1. Both without luck.
I need to have the correct character in the url for the readability of deeplinks.
Solved the problem with iconv function.

Multibyte characters in URL are not rendering

I have a bugging problem. For a website I made there are search engine friendly URL's generated. The only problem is there are ß-chars in the url too. Chars like ö, ï, ä, ü etc. are placed correct. But with the ß-char there is a diamond-icon with a questionmark in it. -> �
I thought it had to do with the charset which is used but i've tried both UTF-8 and iso-8859-1. Both without luck.
I need to have the correct character in the url for the readability of deeplinks.
does the character U+00DF in UTF8 work with you?
i tried to use it on Firefox and the URL was translated into ss
in URL encoding, the U+00DF should be translated to %DF
Thanks for your answers, both + 1. I've solved the problem by using the iconv function, which is installed by default.

Resources