KSC5601
[ class tree: KSC5601 ] [ index: KSC5601 ] [ all elements ]

Class: KSC5601_ext

Source Location: /KSC5601/KSC5601/KSC5601_ext.php

Class Overview

KSC5601_Stream
   |
   --KSC5601_UCS2
      |
      --KSC5601_UTF8
         |
         --KSC5601_ext

Original API of KSC5601 that used iconv or mbstring.


Variables

Methods


Inherited Variables

Inherited Methods

Class: KSC5601_UTF8

KSC5601_UTF8::is_utf8()
whether utf8 or not given strings
KSC5601_UTF8::rm_utf8bom()
remove utf8 bom code (first 3byte)
KSC5601_UTF8::utf8dec()
Convert UTF-8 to UHC
KSC5601_UTF8::utf8enc()
convert UCH to UTF-8

Class: KSC5601_UCS2

KSC5601_UCS2::__construct()
KSC5601_UCS2::init_ksc5601()
Init KSC5601 code table
KSC5601_UCS2::ksc2ucs()
Convert KSC5601 to UCS2 return decimical value or question mark '?'
KSC5601_UCS2::mk_revTable()
Print converting code from hexical string(UCS2) to 2byte binary(KSC5601) character.
KSC5601_UCS2::ucs2ksc()
Convert UCS2 to KSC5601

Class: KSC5601_Stream

KSC5601_Stream::bin2chr()
Convert binary strings to 1byte binary character
KSC5601_Stream::check2byte()
KSC5601_Stream::chr2bin()
Convert binary character 1 byte to binary(numeric) strings
KSC5601_Stream::chr2dec()
Convert 1 byte binary character to decimal strings.
KSC5601_Stream::chr2hex()
Convert character to hex string
KSC5601_Stream::decbin()
Convert decimal strings to 4-digit binary(numeric) strings.
KSC5601_Stream::execute_time()
Print execute time
KSC5601_Stream::hex2chr()
Convert hexical string to 1 byte binary character.
KSC5601_Stream::is_out_of_ksx1001()
Check given 2byte is whether KSX1001 or out of range.

Class Details

[line 40]
Original API of KSC5601 that used iconv or mbstring.



[ Top ]


Class Variables

$out_ksx1001 =  false

[line 56]

Status whether process hangul that is out of ksx1001 range.

Set false, no action for hangul that is out of ksx1001 range.




Tags:

access:  protected

Type:   boolean


[ Top ]



Class Methods


constructor __construct [line 69]

void __construct( KSC5601_Common $is_ext)

Support iconv or mbstring extension, use KSC5601_ext internal class, or not support use KSC5601_pure internal class.



Tags:

access:  public


Overrides KSC5601_UCS2::__construct() (parent method not documented)

Parameters:

KSC5601_Common   $is_ext   return value of KSC5601_Common class

[ Top ]

method is_utf8 [line 103]

boolean is_utf8( string $string, [boolean $ascii = false])

Check given string wheter utf8 of not.



Tags:

return:  Given string is utf8, return true.
access:  public


Overrides KSC5601_UTF8::is_utf8() (whether utf8 or not given strings)

Parameters:

string   $string   Given strings
boolean   $ascii   Check whether is ascii only or not

[ Top ]

method ncr [line 250]

string ncr( string $string, [string $to = NCR], [boolean $enc = false])

Convert between UHC and NCR (Numeric Code Reference)



Tags:

access:  public


Parameters:

string   $string   Given string
string   $to   (optional) Defaults to NCR constant. Value is NCR or UHC constants. Set NCR constant, convert UHC(CP949) to NCR code. Set UHC constant, convert NCR code to UHC(cp949).
boolean   $enc  

(optional) Defaults to false. This parameter is used only UHC -> NCR mode. Set false, only convert hangul that is out of KSX1001 range to NCR when internal $out_ksx1001 variable set true that meas called KSC5601::out_of_ksx1001 (true).

Set true, convert all character to NCR code.


[ Top ]

method out_of_ksx1001 [line 88]

boolean out_of_ksx1001( [boolean $flag = false])

Set whether convert hangul that is out of KSX1001 range. This method changes private $out_ksc1001 variable.



Tags:

access:  public


Parameters:

boolean   $flag   (optional) Defaults to false
  1. true : When decode UTF-8, convert to NCR from hangul character that is out of KSX1001 range.
  2. true : When encode NCR from UHC(CP949), convert to NCR with only hangul that is out of KSX1001 range.
  3. false : No action

[ Top ]

method ucs2 [line 160]

string ucs2( string $string, [string $to = UCS2], [boolean $asc = false])

Convert between UHC and UCS2



Tags:

access:  public


Parameters:

string   $string   Given string
string   $to   (optional) Detauls to UCS2. Value is UCS2 or UHC constants. Set UCS2 constant, convert UHC to UCS2 hexical (for example, U+B620). Set UHC constant, convert UCS2 hexical to UHC.
boolean   $asc   (optional) Defaults to false. This parameter is used only UHC -> UCS2 mode. Set true, convert all characters to UCS2 hexical. Set false, only convert hangul that is out of KSX1001 range to UCS hexical.

[ Top ]

method utf8 [line 125]

string utf8( string $string, [string $to = UTF8])

Convert between UHC and UTF-8



Tags:

see:  KSC5601::out_of_ksx1001
access:  public


Parameters:

string   $string   Given string.
string   $to  

(optional) Defaults to UTF8. Value is UTF8 or UHC constant. This parameter is not set or set with UTF8 constant, convert given string to UTF-8.

Set to UHC constant, conert to uhc from utf-8. If intenal $out_ksx1001 variable is set true that means call KSC5601::out_of_ksx1001(true)), convert to NCR hangul that is out of KSX1001 range.


[ Top ]


Documentation generated on Tue, 14 May 2019 02:00:24 +0900 by phpDocumentor 1.4.4