text

Create an NFC Forum Text Record.

Synopsis

ndeftool text [OPTIONS] TEXT
ndeftool txt [OPTIONS] TEXT

Description

The text command creates an NFC Forum Text Record with the given input text. The text language defaults to English (language code en) and can be set with --language followed by the IANA language code. The text content is encoded as UTF-8 or UTF-16 depending on --encoding. The default encoding is UTF-8.

Options

-l, --language TEXT

Set the IANA language code.

--encoding [UTF-8|UTF-16]

Set the encoding (default UTF-8).

--help

Show this message and exit.

Examples

Create an NFC Forum Text Record with the default language en and encoding UTF-8.

System Message: ERROR/3 (/home/docs/checkouts/readthedocs.org/user_builds/ndeftool/checkouts/v0.1.0/docs/commands/text.rst, line 50)

Command u”ndeftool text ‘created with the nfcpy ndeftool’ print” failed: [Errno 2] No such file or directory

Create one text record with English text and one record with German text.

System Message: ERROR/3 (/home/docs/checkouts/readthedocs.org/user_builds/ndeftool/checkouts/v0.1.0/docs/commands/text.rst, line 54)

Command u”ndeftool text –language en ‘English’ text –language de ‘Deutsch’ print” failed: [Errno 2] No such file or directory

Create a text record with UTF-16 encoding.

$ ndeftool text --encoding UTF-16 'text encoded in UTF-16' | hd
/bin/sh: 1: hd: not found
/bin/sh: 1: ndeftool: not found