declare(encoding=...) ignored because Zend multibyte feature is turned off by settings for ASCII or UTF-8
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C
- Estrellas
- 40.4k
- Forks
- 8.2k
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 96
Descripción
Description
Hello :),
Assume you mix files in distinct encodings in various projects.
If some are in ISO-8859-1 or ISO-8859-15 for example,
and others are in UTF-8.
You can have the habit to always use:
declare(encoding='ISO-8859-1')
// or
declare(encoding='ISO-8859-15')
// or
declare(encoding='UTF-8')
// or
declare(encoding='ASCII')
However, if zend.multibyte=0 and you use files with:
declare(encoding='UTF-8')
// or
declare(encoding='ASCII')
you will get
PHP Warning: declare(encoding=...) ignored because Zend multibyte feature is turned off by settings in
which makes you want to remove them.
And if zend.multibyte=1 and you use files with all declare(encoding=...)
you will get no warning.
I would prefer that PHP states clearly what is preferred when the files can be used separately,
and hence some of these files without Zend multibyte:
- If the prefered solution is to always have the declare(encoding=...) directive,
then the warning
should be suppressed for encodings that do not require multibyte.PHP Warning: declare(encoding=...) ignored because Zend multibyte feature is turned off by settings in - If the prefered solution is to never have the declare(encoding=...) directive for encodings that don't need it,
then the warning should be distinct:
and appear whatever the value of Zend multibyte configuration.PHP Warning: declare(encoding='UTF-8') is useless, remove it.
Thanks, best regards,
Laurent Lyaudet
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se especifica ningún archivo fuente ni ninguna prueba. Reproduce la advertencia con zend.multibyte establecido en 0 y 1 usando los valores declare(encoding=...) indicados y determina después el comportamiento previsto de la advertencia; se considera terminado cuando el comportamiento acordado está implementado y cubierto por comprobaciones de regresión.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- c, php
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100