incorrect \e processing on Windows
| Bug #61827 | incorrect \e processing on Windows | ||||
|---|---|---|---|---|---|
| Submitted: | 2012-04-23 15:35 UTC | Modified: | 2014-07-09 02:56 UTC | ||
| From: | ab@php.net | Assigned: | felipe (profile) | ||
| Status: | Closed | Package: | Scripting Engine problem | ||
| PHP Version: | 5.4.0 | OS: | windows | ||
| Private report: | No | CVE-ID: | None | ||
[2012-04-23 15:35 UTC] ab@php.net
Description: ------------ Zend\tests\bug60350.phpt fails on windows. Simple reproduce case > Debug_TS\php -r "$str = \"\e\"; var_dump(ord($str));" int(101) where it should be 27 The implementation in bug 60350 seems to be not compatible with windows, consider the following snippet ========================================== #include <stdio.h> int main(void) { printf("'%d' '%c' '%d'\n", (int)'\e', (char)27, (int)(char)27); return 0; } ========================================== compiled on linux it gives '27' ' '27' compiled on windows '101' '←' '27' The current implementation uses '\e' for escaping, which should be (char)27 on windows.
Patches
60350.diff (last revision 2012-04-23 15:35 UTC by ab)Pull Requests
History
AllCommentsChangesGit/SVN commits
[2012-04-23 16:35 UTC] ab@php.net
[2012-04-26 14:56 UTC] ab@php.net
[2012-04-26 14:56 UTC] ab@php.net
-Assigned To: +Assigned To: pajoye
[2012-04-29 22:38 UTC] felipe@php.net
-Summary: incorrect \e processing +Summary: incorrect \e processing on Windows -Status: Assigned +Status: Closed
[2012-04-30 05:24 UTC] pajoye@php.net
-Status: Closed +Status: Assigned -Assigned To: pajoye +Assigned To: felipe
[2012-04-30 05:24 UTC] pajoye@php.net
[2012-05-02 09:16 UTC] ab@php.net
-Status: Assigned +Status: Closed
[2014-07-08 17:51 UTC] abanarn at gmail dot com
[2014-07-09 02:56 UTC] yohgaki@php.net