str .= iconv('CP437', 'UTF-8', $char); // return true; // } // // public function getText() // { // return $this -> str; // } //} // class TextCmd extends Command implements TextContainer { private $str = array(); public function addChar($char) { if (isset(Printout::$tree[$char])) { // Reject ESC/POS control chars. return false; } array_push($this -> str , $char); //error_log(implode("", $this -> str)); //error_log($char); return true; } public function getText() { //error_log(iconv("EUC-KR", "UTF-8", implode("", $this -> str))); return iconv("EUC-KR", "UTF-8", implode("", $this -> str)); } }