Bug #81695 [Opn->Nab]: substring issue
| From: | cmb@php.net | Date: | Fri, 03 Dec 2021 16:29:17 +0000 |
| Subject: | Bug #81695 [Opn->Nab]: substring issue | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-238145@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81695&edit=1
ID: 81695
Updated by: cmb@php.net
Reported by: felipeg at hemodynamics dot cl
Summary: substring issue
-Status: Open
+Status: Not a bug
Type: Bug
Package: *Unicode Issues
Operating System: linux, macos
PHP Version: 7.3.33
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
See <https://3v4l.org/FFte1> and <https://3v4l.org/Zv0oj>, and read
up on character encodings.
Previous Comments:
------------------------------------------------------------------------
[2021-12-03 16:00:49] felipeg at hemodynamics dot cl
Description:
------------
---
From manual page: https://php.net/function.substr
---
I tested this problem on linux server, macOs and debian 9.9.
it looks like when substr evaluate "ñó", php translate as ?> and shows no output.
Test script:
---------------
echo substr("Diagnóstico: Infección del muñón, infracondilea izquierda\n", 0,
34);
echo substr("Diagnóstico: Infección del muñón, infracondilea izquierda\n", 0,
34);
Expected result:
----------------
Diagnóstico: Infección del muñ?Diagnóstico: Infección del muñ?Diagnóstico:
Infección del muñ?Diagnóstico: Infección del muñ?
Actual result:
--------------
Diagnóstico: Infección del muñ?Diagnóstico: Infección del muñ?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81695&edit=1