-
-
Notifications
You must be signed in to change notification settings - Fork 16.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure parsing querystring from windows client #2384
Comments
Yes, absolutely only UTF-8 is accepted in the URL. The reason is two-fold: 1) only UTF-8 is allowed in urlencoded ocets in URLs because it's the URL specification and 2) there is no data contained in the URL to signify what encoding the data is in (and it's not necessarily, as it must be UTF-8). It sounds like the client you are using is simply buggy or you may not be using it right. |
In case it helps, this is the correct C# method to encode URL components with: http://msdn.microsoft.com/en-us/library/system.net.webutility.urlencode(v=vs.110).aspx and it uses UTF-8, of course. |
@dougwilson thanks for your help, but It doesn't help. The call comes from within Transact SQL a stored proc. at 1) Querystrings don't need to be UTF-8, RFC's say nothing about encoding like RFC 3629, RFC 3986 Take a look here: http://www.motobit.com/util/url-decoder.asp |
Please read RFC 3986:
The |
The end answer is, if you want it to work with express out-of-the-box, you need to fix your TSQL to send UTF-8. Otherwise, you can use your own query string parser. To use your own custom query string parser, here is an example (requires express >= 4.7.0): app.set('query parser', function (string) {
return parseMyQueryString(string);
}); |
Ok. |
Hi,
I have a windows client which sends a query string url encoded but the character encoding is
not utf-8. I did open an issue within
Qs
. Unfortunately they say it's none of their business, only utf-8 is supported.querystring
does also not work.Is this to be considered a bug or bad luck with my client?
regards
dieter
The example:
The text was updated successfully, but these errors were encountered: