Public bug reported:

The html function returns an empty string or maybe null when a latin1
encoded string is provided.

<?php
print htmlentities('bye'); //outputs 'bye'
print htmlentites('adiós'); //outputs nothing when it's supposed to return 
'adi&oacute;s'
?>

This happened in Ubuntu 12.10b2 32-bit, and it does not happen in ubuntu
12.04

For the moment, the solution is to specify the encoding:
<? htmlentities('adiós', ENT_COMPAT, 'iso-8859-1'); //outputs 'adi&oacute;' as 
expected

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: php5 5.4.6-1ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-15.23-generic 3.5.4
Uname: Linux 3.5.0-15-generic i686
NonfreeKernelModules: wl
ApportVersion: 2.5.3-0ubuntu1
Architecture: i386
Date: Sat Sep 29 10:05:39 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Beta i386 (20120926)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=es_PE:es
 TERM=xterm
 PATH=(custom, no user)
 LANG=es_PE.UTF-8
 SHELL=/bin/bash
SourcePackage: php5
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: php5 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 quantal

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/1058669

Title:
  htmlentities returns nothing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1058669/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to