Ticket #1485500 (closed Patches: worksforme)
International encoding with UTF8 in Washtml.php
| Reported by: | ilifeis | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-stable |
| Component: | PHP backend | Version: | 0.2-beta |
| Severity: | major | Keywords: | washtml, thai, encoding |
| Cc: |
Description
I found problem when use washtml in thai encoding with UTF-8, it cannot show thai encoding. Then I correct this problem with mb_convert_encoding;
CODE: ->
public function wash($html) {
//Charset seems to be ignored (probably if defined in the HTML document)
$node = new DOMDocument('1.0', $this->configcharset?);
$this->extlinks = false;
$html = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8"); @$node->loadHTML($html);
return $this->dumpHtml($node);
}
Change History
Note: See
TracTickets for help on using
tickets.
