Re: [Xsltforms-support] Charset problem (+ bug found)
Brought to you by:
alain-couthures
|
From: Grégoire C. <gco...@gm...> - 2010-02-13 22:31:18
|
Alain,
No, I did not test with IE6 or IE7 as I don't have these browsers.
Grégoire
Le 13 février 2010 23:16, COUTHURES Alain <ala...@ag...> a
écrit :
> Grégoire,
>
> Thank you very much for these fixes. They have been committed now.
>
> I read encodeURIComponent() might be a problem with IE6 and IE7. Did you
> test with them ?
>
> -Alain
>
> Ok,
>
> I found another bug in "xsltforms.js". In "XFSubmission.toUrl_", you have :
>
> if (!hasChilds && val.length > 0) {
> url += node.nodeName + '=' + escape(val) + separator;
> }
>
> but the escape() function works only with ASCII characters. So if the
> XForms is in UTF-8, a GET request will pass the model as ISO.
>
> Solution is to use encodeURIComponent() instead of escape() :
>
> url += node.nodeName + '=' + encodeURIComponent(val) + separator;
>
> Now the strings are encoded correctly.
>
> Regards,
> Grégoire
>
> Le 12 février 2010 19:14, Grégoire Colbert <gco...@gm...> a écrit :
>
>> Hi,
>>
>> I'm submitting my XForm from an UTF-8 encoded page. When the data reaches
>> my eXist query, and I display the parameter, it is displayed as ISO-8859-1
>> on an UTF-8 page.
>>
>> BTW, looking in "xsltforms.js", I noticed that there is a missing "=" near
>> :
>>
>> var media = this.mediatype;
>> var mt = (media || "application/xml")
>> + (this.charset? ";charset" + this.charset : "");
>>
>> this last line should be :
>>
>> + (this.charset? ";charset*=*" + this.charset : "");
>>
>> However this does not solve my problem since "this.charset" is null (well
>> "undefined"). And even if I force UTF-8 with :
>> mt = "application/xml;charset=UTF-8";
>> the request parameters are still converted to ISO somewhere. Any idea?
>>
>> Thanks,
>> Grégoire
>>
>>
> ------------------------------
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOWhttp://p.sf.net/sfu/solaris-dev2dev
>
> ------------------------------
>
> _______________________________________________
> Xsltforms-support mailing lis...@li...://lists.sourceforge.net/lists/listinfo/xsltforms-support
>
>
>
|