- From: Kenneth Rohde Christiansen via GitHub <sysbot+gh@w3.org>
- Date: Tue, 15 Oct 2019 12:25:12 +0000
- To: public-web-nfc@w3.org
We need to find out how to handle the special text record
```js
const records = [
{
recordType: "text",
lang: "en-US",
encoding: "utf-8",
data: encoder.encode("a text string");
}
];
```
We should throw when encoding is different from utf-8 on other text based records. Also throw on the wrong kind of utf-16 (as there are two :))
```js
case "text":
console.log(`Text: ${new TextDecoder(record.encoding).decode(record.data)}, language ${record.lang}`);
break;
```
--
GitHub Notification of comment by kenchris
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/366#issuecomment-542185635 using your GitHub account
Received on Tuesday, 15 October 2019 12:25:14 UTC