I´ve googled a lot, but I wasn´t able to find a solution to my problem. I need to encode a mailto: link with subject and body to UTF-8 in java.
The body consists of plain text
Is there any method which encodes:
Thank you for your help!
I have the following form:
<form action="/example.com/search" method="get" id="frm_Search"><input type="text" name="search_text" placeholder=" Keyword..."> </form>
When form is submited with example keyword "space cat", my landing page becomes following url:
But I want it to be
I googled it but couldn't find a proper solution.
I am trying to display the gliphs for a currencies by using either the html format or unicode one. By using the former I tried all sorts of operations including:
stringByReplacingPercentEscapesUsingEncoding but none of them succeded in turning € into a euro sign. With Unicode the issue was slightly better as:
NSString *aStr = [NSString stringWithUTF8String:[@"\u20ac" UTF8String]];
actually prints a euro sign, but for I reason I do not understand, if I provide the string as the result of a method, the unicode code gets displayed instead.
What is the standard way for displaying euro, dollar or pounds signs in a UILbel?
when i perform a urlencode into an Arabic string , it become unreadable,I intend to use it for urls
<?php$x='كلام عربي'; //Arabic wordecho urlencode($x); //%DF%E1%C7%E3+%DA%D1%C8%EDecho rawurlencode($x); //%DF%E1%C7%E3%20%DA%D1%C8%ED?>
I want to keep it readable , i.e : كلام+عربي
According to several Q&As on SO you're supposed to uri encode anything not ascii and of course several punctuation characters like
& in query string values and keys.
And yet AFAIK not uri encoding works just fine.
works as far as I can tell
The reason I ask is I'm using query strings to do some very simple localization of diagrams. A typical interactive diagram might have 1-5 strings, someone localizing an article that uses the diagram can do something like
bla bla bla bla see the following diagram<iframe src="diagram.html?caption=localized%20string"></iframein the diagram above bla bla bla ....
It's much easier for writers and editors to be able to create, edit and correct non-encoded urls
is much easier than
Regardless of any "standards", if there are no consequences I'd prefer to leave the URLs as un-encoded as possible to make them easier to edit. For example this Q&A says you should encode them but as far as I can tell the example above works in IE, Edge, Chrome, Firefox, Safari, Opera.
I get that I could convert them in some kind of build step. That's beside the point though. If there are no consequences of not encoding them then I will choose to not encode them.
Also, this isn't about interfacing with random other websites or servers. It's my website, my server. I don't care if so-and-so server doesn't handle this case. In fact for my purposes the query string is only used by the client.
Looking at the headers it appears all browsers encode it when making the request from the server so that's seems to suggest it's fine.
So what would be the consequences of not uri encoding non-ascii utf-8 in query string keys and values?