XMLHttpRequest request charset with Firefox 3

XMLHttpRequest request charset with Firefox 3


I've found a bug caused by a change in the Firefox 3 XMLHttpRequest
behaviour
According to the big yellow note in http://developer.mozilla.org/en/docs/XMLHttpRequest#Basic_Usage:
"Versions of Firefox prior to version 3 always send the request using
UTF-8 encoding. When sending a Document, Firefox 3 sends it using the
encoding specified by data.inputEncoding (where data is a non-null
object given to send()). If not present, it is treated as UTF-8."
This implies that, when sending data in the XHR request, the
inputEncoding parameter must be added in order to send the data with
the correct charset.
So jQuery.ajax() should detect the current charset and set the
inputEncoding parameter.