Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #16814

Re: htmlentities($dirs2[$i] not working

From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.php
Subject Re: htmlentities($dirs2[$i] not working
Date 2016-07-02 13:32 +0200
Organization solani.org
Message-ID <nl88ng$5eu$1@solani.org> (permalink)
References <82cb6cae-3d18-4f71-bbc7-b5bcc706c364@googlegroups.com> <57778797$0$5899$e4fe514c@news.xs4all.nl>

Show all headers | View raw


On 02.07.2016 at 11:23, R.Wieser wrote:

> <sonnichjensen@gmail.com> schreef in berichtnieuws
> 82cb6cae-3d18-4f71-bbc7-b5bcc706c364@googlegroups.com...
> 
>> one is tha htmlentities($dirs2[$i] does not longer work - it
>> simply returns an empty string in case it contains ä ö or ü
>>
>> Any idea why?
> 
> Because that is what the docs have specified for it to do when it encounters
> illegal code unit sequences ?

Yes, indeed.  The OP most likely faces the problem outlined in
<http://php.net/manual/en/migration54.incompatible.php#115441>.  The
solution is simple: just explicitly set the $encoding parameter to the
desired enconding, or as of PHP 5.6.0, to set the ini directive
default_charset to the desired value.

-- 
Christoph M. Becker

Back to comp.lang.php | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

htmlentities($dirs2[$i] not working sonnichjensen@gmail.com - 2016-07-02 01:12 -0700
  Re: htmlentities($dirs2[$i] not working "R.Wieser" <address@not.available> - 2016-07-02 11:23 +0200
    Re: htmlentities($dirs2[$i] not working "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-07-02 13:32 +0200

csiph-web