- From: François Beaufort via GitHub <noreply@w3.org>
- Date: Mon, 18 Aug 2025 07:19:17 +0000
- To: public-web-nfc@w3.org
For reference, here's what Chromium uses in https://source.chromium.org/chromium/chromium/src/+/main:services/device/nfc/android/java/src/org/chromium/device/nfc/NdefMessageUtils.java;l=285;drc=7e05550ce03d4b9d22dffac59d0547c7c63b8ae6:
```java
// According to NFCForum-TS-RTD_Text_1.0 specification, section 3.2.1 Syntax.
// First byte of the payload is status byte, defined in Table 3: Status Byte Encodings.
// 0-5: lang code length
// 6 : must be zero
// 7 : 0 - text is in UTF-8 encoding, 1 - text is in UTF-16 encoding.
nfcRecord.encoding = (text[0] & (1 << 7)) == 0 ? ENCODING_UTF8 : ENCODING_UTF16;
```
And here's what NFCForum-TS-RTD_Text_1.0 specification, section 3.2.1 Syntax says:
<img width="654" height="734" alt="Image" src="https://github.com/user-attachments/assets/1f306be5-bc05-477d-b30d-15708b67ec64" />
Based on that, I agree that "MB field" is not the same as the "Status bit encodings". @kenchris What do you think? Can you open a PR to fix this?
Thank you @johntalton for raising this!
--
GitHub Notification of comment by beaufortfrancois
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/669#issuecomment-3195433603 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 18 August 2025 07:19:18 UTC