Menu

## Kanji extends QRDataModeAbstract
in package

Kanji.php : 29

Kanji mode: 13-bit double-byte characters from the Shift-JIS character set

ISO/IEC 18004:2000 Section 8.3.5 ISO/IEC 18004:2000 Section 8.4.5

##### Tags

see
  https://en.wikipedia.org/wiki/Shift_JIS#As_defined_in_JIS_X_0208:1997
see
  http://www.rikai.com/library/kanjitables/kanji_codes.sjis.shtml
see
  https://gist.github.com/codemasher/d07d3e6e9346c08e7a41b8b978784952

### Table of Contents

ENCODING = 'SJIS'
$data : string
  The data to write
$datamode : int
  the current data mode: Num, Alphanum, Kanji, Hanzi, Byte
__construct() : mixed
  QRDataModeAbstract constructor.
convertEncoding() : string
  encoding conversion helper
decodeSegment() : string
getDataMode() : int
  returns the current data mode constant
getLengthInBits() : int
validateString() : bool
  checks if a string qualifies as SJIS Kanji
write() : void
getCharCount() : int
  returns the character count of the $data string
getLengthBits() : int
  shortcut

### Constants

#### ENCODING

Kanji.php : 33
`public mixed ENCODING = 'SJIS'`

### Properties

#### $data

QRDataModeAbstract.php : 28

The data to write

`protected string $data`

#### $datamode

Kanji.php : 38

the current data mode: Num, Alphanum, Kanji, Hanzi, Byte

`protected static int $datamode = \chillerlan\QRCode\Common\Mode::KANJI`

##### Tags

inheritDoc

### Methods

#### __construct()

QRDataModeAbstract.php : 35

QRDataModeAbstract constructor.

`public __construct(string $data) : mixed`

##### Parameters

$data : string

##### Tags

throws
  QRCodeDataException

##### Return values

mixed —

#### convertEncoding()

Kanji.php : 57

encoding conversion helper

`public static convertEncoding(string $string) : string`

##### Parameters

$string : string

##### Tags

inheritDoc

##### Return values

string —

#### decodeSegment()

Kanji.php : 157
`public static decodeSegment(BitBuffer $bitBuffer, int $versionNumber) : string`

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

inheritDoc
throws
  QRCodeDataException

##### Return values

string —

#### getDataMode()

QRDataModeAbstract.php : 55

returns the current data mode constant

`public getDataMode() : int`

##### Tags

inheritDoc

##### Return values

int —

#### getLengthInBits()

Kanji.php : 50
`public getLengthInBits() : int`

##### Tags

inheritDoc

##### Return values

int —

#### validateString()

Kanji.php : 82

checks if a string qualifies as SJIS Kanji

`public static validateString(string $string) : bool`

##### Parameters

$string : string

##### Return values

bool —

#### write()

Kanji.php : 121
`public write(BitBuffer $bitBuffer, int $versionNumber) : void`

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

inheritDoc
throws
  QRCodeDataException

  on an illegal character occurence

##### Return values

void —

#### getCharCount()

Kanji.php : 43

returns the character count of the $data string

`protected getCharCount() : int`

##### Tags

inheritDoc

##### Return values

int —

#### getLengthBits()

QRDataModeAbstract.php : 69

shortcut

`protected static getLengthBits(int $versionNumber) : int`

##### Parameters

$versionNumber : int

##### Return values

int —

## Search results