W3C home > Mailing lists > Public > public-payments-wg@w3.org > September 2016

Re: [w3c/webpayments] propose to add encoding attribute to data set (#181)

From: Ade Bateman <notifications@github.com>
Date: Fri, 23 Sep 2016 09:16:06 -0700
To: w3c/webpayments <webpayments@noreply.github.com>
Cc: webpayments <public-payments-wg@w3.org>, Comment <comment@noreply.github.com>
Message-ID: <w3c/webpayments/issues/181/249236089@github.com>
We've discussed this before. All strings in JavaScript are encoded in UTF-16. When resources are loaded over the network or from files the correct encoding must be specified. This allows the browser to convert from the encoded text into UTF-16. All browser APIs that operate on strings use UTF-16.

Needing to use a mechanism such as https://goo.gl/rC4f7T suggests that an incorrect charset is specified when data is read by the browser. If you don't indicate the correct encoding for data then it will never work correctly but properly tagged data will work automatically.

Here is how it works with the encode/decode steps shown: http://go4a.de/2cqTj46

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webpayments/issues/181#issuecomment-249236089
Received on Friday, 23 September 2016 16:17:11 UTC

This archive was generated by hypermail 2.3.1 : Friday, 23 September 2016 16:17:13 UTC