ivan.ender...@hoa-project.net ("Ivan Enderlin @ Hoa") wrote:

> Hello,
> 
> Some of my users & contributors have met an issue with files containing 
> UTF-8 on certain Windows configurations (but they actually did not found 
> the difference). Any idea why?
> The issue does not appear on Linux, BSD or Mac OS system, only for 
> certain Windows.
> 
> What do we need to check? --enable-zend-multibyte, some php.ini magic 
> parameters, some ENV variables?
> 
> Best regards.
> 
> -- 
> Ivan Enderlin
> Developer of Hoa
> http://hoa.42/ or http://hoa-project.net/
> 
> PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis)
> http://disc.univ-fcomte.fr/ and http://www.inria.fr/
> 
> Member of HTML and WebApps Working Group of W3C
> http://w3.org/
> 


If you are experimenting problems with file paths and files that do exist on a
system but not in another system (that is, source files containing non-ASCII
chars in either their name or their path), the issue may depend on the
different configuration of the locale configuration.

Under Unix/Linux check the environment variable LC_CTYPE, whose value might be
something like "language_country.UTF-8", where "UTF-8" is the encoding of file
names and paths. File names and file paths in every include*() and require*()
must then be UTF-8 encoded as well.

Windows uses the UTF-16 encoding for file names. Programs unaware of this
encoding (as the PHP interpreter still is) MUST use the current Windows code
page as set in the "Language and Regional Settings" of the control panel.
Typically LC_CTYPE evaluates to something like "language_country.1252" on
systems configured in the western countries, where 1252 is a Windows code page
very similar, but not equal, to ISO-8859-1; so file names and paths specified
in the require*() and include*() must be encoded accordingly. Under Windows,
UTF-8 IS NOT a valid code page.
More details about this issue in my comment to
the bug 47096: https://bugs.php.net/bug.php?id=47096

Regards,
 ___ 
/_|_\  Umberto Salsi
\/_\/  www.icosaedro.it


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to