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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: coltware at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC