Re: TextWiki and pound (£) signs
| From: | bertrand Gugger | Date: | Mon, 14 Nov 2005 05:00:15 +0000 |
| Subject: | Re: TextWiki and pound (£) signs | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21902@lists.php.net to get a copy of this message | ||
Bonjour,
Jocke Selin wrote:
On Sunday 13 November 2005 03:09, Justin Patrin wrote:In this case, you need to configure the renderer to use it: $oTextWiki->setFormatConf('Xhtml', 'charset', 'UTF-8'); Then, the sterling will be correctly htmlentified. That will also be the case if you save you script in ISO which is the default charset, so without needing the renderer conf. Anyway, the sterling within the anchors will never be entified, that's not correct. Please report a bug so we don't loose that. a+ -- togggOn 11/12/05, Jocke Selin <the.joxor@gmail.com> wrote:Justin, I think you might be right. However, the £-sign is OK if it is in a link. I did a new test and got these results: Code: --- <?php $sText = "This //string// **contains** a pound £ sign. This link also [http://example.com/ contains a £ sign] but this one is allright."; print($sText); require_once("Text/Wiki.php"); $oTextWiki =& new Text_Wiki(); print($oTextWiki->transform($sText, 'Xhtml')); ?> --- HTML output --- This //string// **contains** a pound £ sign. This link also [http://example.com/ contains a £ sign] but this one is allright. This string contains a pound £ sign. This link also contains a £ sign but this one is allright. --- HTML Source --- This //string// **contains** a pound £ sign. This link also [http://example.com/ contains a £ sign] but this one is allright.<p>This <em>string</em> <strong>contains</strong> a pound £ sign. This link also <a href="http://example.com/" onclick="window.open(this.href, '_blank'); return false;">contains a £ sign</a> but this one is allright.</p> --- /Jocke It seems your script is saved in UTF8 (where £ is encoded on 2 bytes).Source outputted: -------------- This //string// **contains** a pound £ sign.<p>This <em>string</em> <strong>contains</strong> a pound £ sign.</p> --------------This is likely because Text_Wiki uses the normal string functions instead of the multi-byte string functions.