php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63817 CreateOutline encoder argument is always NULL
Submitted: 2012-12-20 17:00 UTC Modified: 2012-12-20 17:44 UTC
From: coltware at gmail dot com Assigned: tony2001 (profile)
Status: Closed Package: haru (PECL)
PHP Version: 5.3.20 OS: Linux
Private report: No CVE-ID: None
 [2012-12-20 17:00 UTC] coltware at gmail dot com
Description:
------------
HaruDoc::createOutline 
3rd argument ( encoder ) is always ignored.
So I can NOT make japanese outline,

We call this is 'Mojibake' problem. 

Test script:
---------------
<?php
$doc = new HaruDoc();
$doc->useJPEncodings();
$doc->setPageMode(HaruDoc::PAGE_MODE_USE_OUTLINE);
$page = $doc->addPage();
$page->setSize(HaruPage::SIZE_A4,HaruPage::LANDSCAPE);

$font = $doc->getFont("Courier-Bold");
$page->setFontAndSize($font,60);

$page->beginText();
$page->textOut(210,270,"Hello World");
$page->endText();

$outline_ok = $doc->createOutline("TEST");

$hello_ja = mb_convert_encoding("こんにちは","SJIS-win","UTF-8");
$outline_ng = $doc->createOutline($hello_ja,null,$doc->getEncoder("90ms-RKSJ-H"));

$doc->save("test.pdf");

?>


Expected result:
----------------
zend_parse_parameters argument was wrong.

NG ) s|o!o!
OK ) s|O!O!




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-20 17:39 UTC] tony2001@php.net
Automatic comment from SVN on behalf of tony2001
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=328851
Log: fix bug #63817 (CreateOutline encoder argument is always NULL)
 [2012-12-20 17:44 UTC] tony2001@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Indeed, thanks for reporting it!
 [2012-12-20 17:44 UTC] tony2001@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: tony2001
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Oct 22 04:01:24 2020 UTC