Doc #68284 [NEW]: declare encoding docs unclear / encoding handling needs better docs

From: Date: Wed, 22 Oct 2014 09:17:55 +0000
Subject: Doc #68284 [NEW]: declare encoding docs unclear / encoding handling needs better docs
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11569@lists.php.net to get a copy of this message
From: php-bugs at allenjb dot me dot uk Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:declare encoding docs unclear / encoding handling needs better docs Description: ------------ http://php.net/manual/en/control-structures.declare.php#control-structures.declare.encoding The documentation for declare encoding is unclear as to what it actually effects. It only says "script encoding", which is, in my opinion, ambiguous. Is this the encoding in which php source files are presumed to be written? Does it affect anything else such as filesystem functions (file() / fgetcsv(), etc)? The documentation states the setting is "per script". Does this mean per-source-file, or for an entire script run? Once changed, does the setting apply only to the current file, or to all included / required files too? Can the setting be changed multiple times, and if so, is there any way to obtain the current value? The documentation should clearly say what changes this setting invokes and what it affects. It may be useful to explicitly document when developers would want to consider changing this setting. Specifically it might be useful to document how it differs from: ini_set('default_charset', 'UTF-8'); mb_internal_encoding("UTF-8"); As a further expansion, it might actually be useful if the manual had a dedicated section on encoding handling (even if most of it is just links to the encoding settings / functions for specific extensions) - especially with some of the features that are looking to make their way into PHP 7. Something like the sections under 'Features', such as 'Connection Handling', that are basically top-level summaries with links to the related manual sections / functions for specifics. -- Edit bug report at https://bugs.php.net/bug.php?id=68284&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68284&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68284&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68284&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68284&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68284&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68284&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68284&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68284&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68284&r=support Expected behavior: https://bugs.php.net/fix.php?id=68284&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68284&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68284&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68284&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68284&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68284&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68284&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68284&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68284&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68284&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68284&r=mysqlcfg

« previous php.doc.bugs (#11569) next »