PhpDocumentor中文乱码解决办法

根据PEAR手册上所说:

File Formats
All scripts contributed to PEAR must:

Be stored as ASCII text

Use ISO-8859-1 character encoding

Be Unix formatted

“Unix formatted” means two things:

1) Lines must end only with a line feed (LF). Line feeds are represented as ordinal 10, octal 012 and hex 0A. Do not use carriage returns (CR) like Macintosh computers do or the carriage return/line feed combination (CRLF) like Windows computers do.

2) There should be one line feed after the closing PHP tag (?>). This means that when the cursor is at the very end of the file, it should be one line below the closing PHP tag.

解决办法比较机械:
PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/ 目录下面所有模板文件:
iso-8859-1替换成utf-8

相关编码知识:
ISO 8859-1,正式编号为ISO/IEC 8859-1:1998,又称Latin-1或“西欧语言”,是国际标准化组织内ISO/IEC 8859的第一个8位字符集。

更多
3 Responses Post a comment
  1. 荒野无灯

    替换的话,直接EmEditor 或者 NPP 一键秒了。 :neutral:

  2. 荒野无灯

    :mrgreen: 这个东西用起来还是相当方便的。可以结合IDE工具。如在netbeans里面就很方便。

  3. 小邪

    沙发(哇,刚刚才知道原来有能够快速生成具有相互参照索引等功能的API文档的程序

Leave a Reply

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS