Bug #79217 [NEW]: Last character of a UTF-8 string gets messed up

From: Date: Mon, 03 Feb 2020 22:06:52 +0000
Subject: Bug #79217 [NEW]: Last character of a UTF-8 string gets messed up
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225337@lists.php.net to get a copy of this message
From:             steve dot lloyd at gmail dot com
Operating system: Centos
PHP version:      7.3.14
Package:          ODBC related
Bug Type:         Bug
Bug description:Last character of a UTF-8 string gets messed up

Description:
------------
Last character of a UTF-8 string gets messed up.  See stackoverflow URL
in Test Script section.  I have tried this with multiple PHP versions. 
I have concluded it must be an issue with PHP ODBC functions as it works
fine in other languages (python, isql).

Test script:
---------------
https://stackoverflow.com/questions/59904479/last-character-issue-with-sap-hana-utf8-on-php

Expected result:
----------------
因采购/仓库而被冻结
因任务清单/BOM而被冻结
MPN:BOM抬头冻结
gesp. für Besch./Lager
gesp. für Arb.plan/Stückl

Actual result:
--------------
因采购/仓库而被冻ad
因任务清单/BOM而被ader
MPN:BOM抬头冻结
gesp. für Besch./Lager
gesp. für Arb.plan/Stüca

-- 
Edit bug report at https://bugs.php.net/bug.php?id=79217&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79217&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79217&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79217&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79217&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79217&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79217&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79217&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79217&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79217&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79217&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79217&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79217&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79217&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79217&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79217&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79217&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79217&r=mysqlcfg


Thread (11 messages)

« previous php.bugs (#225337) next »