encodeText

Returns a QR Code representing the specified Unicode text string at the specified error correction level. As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer Unicode code points (not UTF-16 code units) if the low error correction level is used. The smallest possible QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.

Return

a QR Code (not null) representing the text

Parameters

text

the text to be encoded (not null), which can be any Unicode string

ecl

the error correction level to use (not null) (boostable)

Throws

if the text or error correction level is null

if the text fails to fit in the largest version QR Code at the ECL, which means it is too long