{"id":2499,"date":"2013-11-05T13:59:22","date_gmt":"2013-11-05T04:59:22","guid":{"rendered":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/?p=2499"},"modified":"2013-11-05T14:00:24","modified_gmt":"2013-11-05T05:00:24","slug":"phpword%e3%81%a7%e6%96%87%e6%9b%b8%e7%94%9f%e6%88%90","status":"publish","type":"post","link":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2013\/11\/05\/2499\/","title":{"rendered":"PHPWord\u3067\u6587\u66f8\u751f\u6210"},"content":{"rendered":"<p>\u6587\u66f8\u3092\u81ea\u52d5\u751f\u6210\u3057\u3088\u3046\u3068\u3057\u3066\u3001\u305d\u3046\u8a00\u3048\u3070PHPExcel\u3063\u3066\u3042\u3063\u305f\u3088\u306a\u3068\u601d\u3063\u3066\u63a2\u3057\u3066\u3044\u308b\u3068\u3001PHPWord\u3068\u3044\u3046\u3082\u306e\u3082\u5b58\u5728\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u77e5\u308b\uff08\u958b\u767a\u306f2011\u5e74\u3067\u6b62\u307e\u3063\u3066\u3044\u308b\uff09\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/phpword.codeplex.com\/\">PHPWord &#8211; Home<br \/>\n<\/a>\n<\/ul>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u7df4\u7fd2\u6587\u66f8\u3092\u4f5c\u6210\u3057\u3066\u307f\u3088\u3046\u3068\u3059\u308b\u3068\u3001\uff08\u7d39\u4ecb\u30da\u30fc\u30b8\u306b\u3042\u308b\u3068\u304a\u308a\uff09\u65e5\u672c\u8a9e\u304c\u6587\u5b57\u5316\u3051\u3057\u3066\u3057\u307e\u3063\u3066\u304d\u3061\u3093\u3068\u6587\u66f8\u751f\u6210\u304c\u3067\u304d\u306a\u3044\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/phpjp.info\/?PHPWord%20Word%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E4%BD%9C%E6%88%90\">PHPWord Word\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210 &#8211; PHPJP<br \/>\n<\/a><\/p>\n<ul>\n<li>utf8_encode()\u3092\u4f7f\u3063\u305f\u5909\u63db\u3092\u3084\u3081\u307e\u3059\u3002\n <\/ul>\n<li><a href=\"http:\/\/d.hatena.ne.jp\/mikage014\/20110702\/1309594008\">PHPWord\u3092\u4f7f\u3063\u3066PHP\u3067\u65e5\u672c\u8a9eWord\u6587\u66f8\u3092\u51fa\u529b\u3059\u308b &#8211; mikage014\u306e\u65e5\u8a18<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/www.atyks.org\/blog\/detail\/2013-05-16-1\">[php]PHPWord\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u6539\u884c\u3092\u542b\u3080\u6587\u5b57\u5217\u3092setValue\u3067\u8ffd\u52a0\u3059\u308b | \u30d6\u30ed\u30b0 | \u305d\u3046\u3060\u8eca\u8f2a\u3068\u540d\u3065\u3051\u3088\u3046 5th<br \/>\n<\/a>\n<\/ul>\n<p>PHPWord\u306e\u5185\u90e8\u3067\u4f7f\u308f\u308c\u3066\u3044\u308butf8_encode()\u95a2\u6570\u304c\u60aa\u3055\u3092\u3057\u3066\u3044\u308b\u3089\u3057\u304f\u3001\u8a72\u5f53\u7b87\u6240\u3092\u63a2\u3059\u306821\u4ef6\u4ef6\u51fa\u3066\u304d\u305f\u3002<\/p>\n<div class=\"hl-surround\" style=\"height:280px;\"><div class=\"hl-main\"><pre>$ grep -r -n utf8_encode ..\/PHPWord.php . | cat -n\r\n     1  ..\/PHPWord.php:35:runkit_function_remove('utf8_encode');\r\n     2  ..\/PHPWord.php:36:runkit_function_add('utf8_encode', '$text', 'echo $text.&quot;\\n&quot;; return mb_convert_encoding($text, &quot;utf8&quot;, &quot;auto&quot;);');\r\n     3  .\/Section\/Footer.php:75:                $givenText = utf8_encode($text);\r\n     4  .\/Section\/Footer.php:165:               $text = utf8_encode($text);\r\n     5  .\/Section\/TextRun.php:83:               $givenText = utf8_encode($text);\r\n     6  .\/Section\/TextRun.php:98:               $linkSrc = utf8_encode($linkSrc);\r\n     7  .\/Section\/TextRun.php:100:                      $linkName = utf8_encode($linkName);\r\n     8  .\/Section\/Table\/Cell.php:111:           $text = utf8_encode($text);\r\n     9  .\/Section\/Table\/Cell.php:127:                   $linkSrc = utf8_encode($linkSrc);\r\n    10  .\/Section\/Table\/Cell.php:129:                           $linkName = utf8_encode($linkName);\r\n    11  .\/Section\/Table\/Cell.php:163:           $text = utf8_encode($text);\r\n    12  .\/Section\/Table\/Cell.php:272:                   $text = utf8_encode($text);\r\n    13  .\/Section\/Header.php:75:                $givenText = utf8_encode($text);\r\n    14  .\/Section\/Header.php:165:               $text = utf8_encode($text);\r\n    15  .\/Shared\/String.php:150:                return utf8_encode(utf8_decode($value)) === $value;\r\n    16  .\/Section.php:112:              $givenText = utf8_encode($text);\r\n    17  .\/Section.php:128:              $linkSrc = utf8_encode($linkSrc);\r\n    18  .\/Section.php:130:                      $linkName = utf8_encode($linkName);\r\n    19  .\/Section.php:182:              $text = utf8_encode($text);\r\n    20  .\/Section.php:290:              $text = utf8_encode($text);\r\n    21  .\/Template.php:89:            $replace = utf8_encode($replace);<\/pre><\/div><\/div>\n<p>utf8_encode()\u81ea\u4f53\u306fphp\u6a19\u6e96\u95a2\u6570\u306a\u306e\u3060\u304c\u3001utf8\u3068\u3044\u3063\u3066\u3082ISO-8859-1\u306eLatin-1\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u306b\u3057\u304b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u6587\u5b57\u5316\u3051\u3092\u8d77\u3053\u3057\u3066\u3044\u308b\u306e\u3089\u3057\u3044\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/php.net\/manual\/ja\/function.utf8-encode.php\">PHP: utf8_encode \u2014 ISO-8859-1 \u6587\u5b57\u5217\u3092 UTF-8 \u306b\u30a8\u30f3\u30b3\u30fc\u30c9\u3059\u308b<br \/>\n<\/a>\n<\/ul>\n<p>\u547c\u3070\u308c\u65b9\u306f\u3001\u57fa\u672c\u7684\u306b\u300c$X = utf8_encode($X)\u300d\u3068\u3044\u3046\u5f62\u5f0f\u306a\u306e\u3067\u3001\u547c\u3073\u51fa\u3057\u305f\u304f\u306a\u3051\u308c\u3070\u305d\u306e\u884c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308c\u3070\u3044\u3044\u306e\u3060\u304c\u3001\u3068\u3053\u308d\u3069\u3053\u308d\u300c$givenText = utf8_encode($text)\u300d\u3068\u3044\u3046\u98a8\u306b\u5358\u306b\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3067\u306f\u5bfe\u5fdc\u3067\u304d\u306a\u3055\u305d\u3046\u306a\u500b\u6240\u3082\u3042\u308b\u3002\u307e\u305f\u3001\u5148\u306e\u7d39\u4ecb\u30da\u30fc\u30b8\u3067\u306f\u3001\u8a72\u5f53\u7b87\u6240\u3067utf8_encode()\u3092\u524a\u9664\u3059\u308c\u3070\uff08\u95a2\u6570\u547c\u3073\u51fa\u3057\u3092\u5916\u305b\u3070\uff09\u3044\u3044\u3068\u3044\u3046\u5bfe\u5fdc\u3082\u3042\u308b\u306e\u3060\u304c\u3001\u8907\u6570\u500b\u6240\u5b58\u5728\u3059\u308b\u3057\u5bfe\u5fdc\u629c\u3051\u3084\u3089\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u66f4\u65b0\u3055\u308c\u305f\u5834\u5408\uff08\u306f\u3001\u5f53\u5206\u5b9f\u73fe\u3057\u305d\u3046\u306b\u306a\u3044\u304c\uff09\u306e\u5bfe\u5fdc\u306a\u3069\u304c\u9762\u5012\u304b\u3068\u8003\u3048\u3066\u3001\u3053\u306e\u95a2\u6570\u81ea\u4f53\u3092mb_convert_encoding()\u306b\u7f6e\u304d\u63db\u3048\u308c\u3070\u3044\u3044\u306e\u3067\u306f\u306a\u3044\u304b\u3001\u3068\u8003\u3048\u305f\u306e\u3060\u304c\u3001\u305d\u3053\u304b\u3089\u304c\u9577\u304b\u3063\u305f\u2026\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u66f8\u3092\u81ea\u52d5\u751f\u6210\u3057\u3088\u3046\u3068\u3057\u3066\u3001\u305d\u3046\u8a00\u3048\u3070PHPExcel\u3063\u3066\u3042\u3063\u305f\u3088\u306a\u3068\u601d\u3063\u3066\u63a2\u3057\u3066\u3044\u308b\u3068\u3001PHPWord\u3068\u3044\u3046\u3082\u306e\u3082\u5b58\u5728\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u77e5\u308b\uff08\u958b\u767a\u306f2011\u5e74\u3067\u6b62\u307e\u3063\u3066\u3044\u308b\uff09\u3002 PHPWord &#8211; Home \u3068 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[60,310],"_links":{"self":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/2499"}],"collection":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/comments?post=2499"}],"version-history":[{"count":6,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/2499\/revisions"}],"predecessor-version":[{"id":2506,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/2499\/revisions\/2506"}],"wp:attachment":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/media?parent=2499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/categories?post=2499"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/tags?post=2499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}