What is the proper way to URL encode Unicode characters?

I would always encode in UTF-8. From the Wikipedia page on percent encoding: The generic URI syntax mandates that new URI schemes that provide for the representation of character data in a URI must, in effect, represent characters from the unreserved set without translation, and should convert all other characters to bytes according to UTF-8, … Read more

Valid content-type for XML, HTML and XHTML documents

HTML: text/html, full-stop. XHTML: application/xhtml+xml, or only if following HTML compatbility guidelines, text/html. See the W3 Media Types Note. XML: text/xml, application/xml (RFC 2376). There are also many other media types based around XML, for example application/rss+xml or image/svg+xml. It’s a safe bet that any unrecognised but registered ending in +xml is XML-based. See the … Read more

Is there a query language for JSON?

EDIT Sept 2022: JMESPath seems to be the most widely-used, fastest-growing, and best-reviewed of alternatives for this. It has many features, including “where”-style filters. ORIGINAL: Sure, how about: JsonPath. Json Query They all seem to be a bit work in progress, but work to some degree. They are also similar to XPath and XQuery conceptually; … Read more

input type=”submit” Vs button tag are they interchangeable? [duplicate]

http://www.w3.org/TR/html4/interact/forms.html#h-17.5 Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to “image”, but the BUTTON element … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)