From:             rick at revenew dot nl
Operating system: Linux (Redhat 7.1/Debian Woody)
PHP version:      4.3.5
PHP Bug Type:     Feature/Change Request
Bug description:  Cannot create escaped character from multiple strings

Description:
------------
Let's say I have a variable $var which contains 94.

Now I want to create the escaped character \x94 from this var. This seems
to be impossible. I've tried all kinds different approaches. Simply
concatenating two strings (single or double quoted). escaping the \x with
\ sprintf()'ing  etc. It seems like it's impossible to create the escaped
character from 2 (or more) parts.



At the moment I'm using a dirty fix to overcome this problem:



I have an array like this:



array(

                "\\x00"=>"\x00",

                "\\x01"=>"\x01",

                "\\x02"=>"\x02",

                "\\x03"=>"\x03",

                etc..

)



with this aray you can perform a strtr(); Which works around the problem.


-- 
Edit bug report at http://bugs.php.net/?id=27864&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27864&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27864&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27864&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27864&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27864&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27864&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27864&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27864&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27864&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27864&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27864&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27864&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27864&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27864&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27864&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27864&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27864&r=float

Reply via email to