API Docs for: undefined
Show:

QrCode.Ucs2Data Class

This class sets the extended channel interpretation mode indicator for the ucs2 character set. While this is a Data object, it does not directly encode data. Instead, it sets a flag in the data stream which tells a decoder how to interpret the data that follows. Ucs2 is an interesting character set because JavaScript strings are handled in ucs2. Combined with the ByteData object and a character width set to 16, any JavaScript string can be precisely encoded. Unfortunately it appears that many decoders lack support for the ucs2 character set. Android's standard Barcode Scanner application does provide support, but the font used to display the result is not able to render the entire range of unicode characters.

Constructor

QrCode.Ucs2Data

(
  • config
)

Parameters:

  • config Object

    Configuration object.

Item Index

Attributes

Methods

toBinaryString

(
  • version
)
String

Returns a properly formatted binary string for ucs2 data.

Parameters:

Returns:

toBinaryString

(
  • version
)
String

This is an abstract method that should be implemented to return a properly formatted binary string for a specific data encoding mode.

Parameters:

Returns:

Attributes

type

String

Inherited from QrCode.Data but overwritten in js/qr-code-generator-base.js:4754

Default: 'ucs2'

Fires event typeChange

Fires when the value for the configuration attribute type is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

value

Number | String

Inherited from QrCode.Data but overwritten in js/qr-code-generator-base.js:4764

This object does not require a value.

Default: ''

Fires event valueChange

Fires when the value for the configuration attribute value is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.