Bug #64057 [Com]: substr_replace failed charset utf-8

2013-01-26 Thread ltsujiguchi at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=64057&edit=1

 ID: 64057
 Comment by: ltsujiguchi at gmail dot com
 Reported by:ltsujiguchi at gmail dot com
 Summary:substr_replace failed charset utf-8
 Status: Open
 Type:   Bug
 Package:Strings related
 Operating System:   Ubuntu 12.10
 PHP Version:5.4.11
 Block user comment: N
 Private report: N

 New Comment:

Using echo bin2hex($cond);

Return:
6e6f74696369612e6e6f74696369615f746974756c6f204c494b452025c3a925204f52206e6f74696
369615f6e6f74696369615f636f6e746575646f204c494b4525c3a9253f


Previous Comments:

[2013-01-26 13:50:36] ltsujiguchi at gmail dot com

Update comment above: [2013-01-26 13:37 UTC] ltsujiguchi at gmail dot com

Using source in gedit new file
Manually 



Result:
noticia.noticia_titulo LIKE %éééééááááá% OR 
noticia.noticia_cont%éééééááááá%udo 
LIKE ?


[2013-01-26 13:42:04] ltsujiguchi at gmail dot com

Concatenating solved using substr.


[2013-01-26 13:37:29] ltsujiguchi at gmail dot com

Use NetBeans 7.2 using codification UTF-8.

Outher problem using:
$replacement = '%ééééáááá%';

Result approximate:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo L%é%IKE ?


[2013-01-24 03:45:05] ahar...@php.net

Works fine for me too. Can you upload the entire file (preferably without 
copy/pasting), please?


[2013-01-23 21:46:03] mail+php at requinix dot net

Do you have one of those weird editors where shift+space produces something 
besides a regular space? It may sound stupid and probably won't change anything 
but try deleting the "LIKE ?" and typing it again carefully.

Also stupid and pointless, check that
  echo bin2hex($cond);
ends in "...4c494b45203f".




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=64057


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64057&edit=1


Bug #64057 [Com]: substr_replace failed charset utf-8

2013-01-26 Thread ltsujiguchi at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=64057&edit=1

 ID: 64057
 Comment by: ltsujiguchi at gmail dot com
 Reported by:ltsujiguchi at gmail dot com
 Summary:substr_replace failed charset utf-8
 Status: Open
 Type:   Bug
 Package:Strings related
 Operating System:   Ubuntu 12.10
 PHP Version:5.4.11
 Block user comment: N
 Private report: N

 New Comment:

Update comment above: [2013-01-26 13:37 UTC] ltsujiguchi at gmail dot com

Using source in gedit new file
Manually 



Result:
noticia.noticia_titulo LIKE %éééééááááá% OR 
noticia.noticia_cont%éééééááááá%udo 
LIKE ?


Previous Comments:

[2013-01-26 13:42:04] ltsujiguchi at gmail dot com

Concatenating solved using substr.


[2013-01-26 13:37:29] ltsujiguchi at gmail dot com

Use NetBeans 7.2 using codification UTF-8.

Outher problem using:
$replacement = '%ééééáááá%';

Result approximate:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo L%é%IKE ?


[2013-01-24 03:45:05] ahar...@php.net

Works fine for me too. Can you upload the entire file (preferably without 
copy/pasting), please?


[2013-01-23 21:46:03] mail+php at requinix dot net

Do you have one of those weird editors where shift+space produces something 
besides a regular space? It may sound stupid and probably won't change anything 
but try deleting the "LIKE ?" and typing it again carefully.

Also stupid and pointless, check that
  echo bin2hex($cond);
ends in "...4c494b45203f".


[2013-01-23 18:21:39] krak...@php.net

[joe@fiji php-5.4.6]$ nano 64057.php
[joe@fiji php-5.4.6]$ sapi/cli/php 64057.php
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE %é%

Anyone else ??




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=64057


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64057&edit=1


Bug #64057 [Fbk->Opn]: substr_replace failed charset utf-8

2013-01-26 Thread ltsujiguchi at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=64057&edit=1

 ID: 64057
 User updated by:ltsujiguchi at gmail dot com
 Reported by:ltsujiguchi at gmail dot com
 Summary:substr_replace failed charset utf-8
-Status: Feedback
+Status: Open
 Type:   Bug
 Package:Strings related
 Operating System:   Ubuntu 12.10
 PHP Version:5.4.11
 Block user comment: N
 Private report: N

 New Comment:

Concatenating solved using substr.


Previous Comments:

[2013-01-26 13:37:29] ltsujiguchi at gmail dot com

Use NetBeans 7.2 using codification UTF-8.

Outher problem using:
$replacement = '%ééééáááá%';

Result approximate:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo L%é%IKE ?


[2013-01-24 03:45:05] ahar...@php.net

Works fine for me too. Can you upload the entire file (preferably without 
copy/pasting), please?


[2013-01-23 21:46:03] mail+php at requinix dot net

Do you have one of those weird editors where shift+space produces something 
besides a regular space? It may sound stupid and probably won't change anything 
but try deleting the "LIKE ?" and typing it again carefully.

Also stupid and pointless, check that
  echo bin2hex($cond);
ends in "...4c494b45203f".


[2013-01-23 18:21:39] krak...@php.net

[joe@fiji php-5.4.6]$ nano 64057.php
[joe@fiji php-5.4.6]$ sapi/cli/php 64057.php
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE %é%

Anyone else ??

--------
[2013-01-23 17:54:21] ltsujiguchi at gmail dot com

Description:

I had a problem when i used the substr_replace, using those changes os php.ini:

I couldn't find the exact version of my php on the drop, so i put the closest 
version, but my real version is the 5.4.6.

Result expected:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE %é%

Result returned:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE%é%?

Test script:
---
$replacement = '%é%';
$cond = 'noticia.noticia_titulo LIKE ? OR noticia.noticia_conteudo LIKE ?';
$posItem = stripos($cond, '?');
$cond = substr_replace($cond, $replacement, $posItem, 1);
$posItem = stripos($cond, '?');
$cond = substr_replace($cond, $replacement, $posItem, 1);
echo $cond;







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64057&edit=1


Bug #64057 [Com]: substr_replace failed charset utf-8

2013-01-26 Thread ltsujiguchi at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=64057&edit=1

 ID: 64057
 Comment by: ltsujiguchi at gmail dot com
 Reported by:ltsujiguchi at gmail dot com
 Summary:substr_replace failed charset utf-8
 Status: Feedback
 Type:   Bug
 Package:Strings related
 Operating System:   Ubuntu 12.10
 PHP Version:5.4.11
 Block user comment: N
 Private report: N

 New Comment:

Use NetBeans 7.2 using codification UTF-8.

Outher problem using:
$replacement = '%ééééáááá%';

Result approximate:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo L%é%IKE ?


Previous Comments:

[2013-01-24 03:45:05] ahar...@php.net

Works fine for me too. Can you upload the entire file (preferably without 
copy/pasting), please?


[2013-01-23 21:46:03] mail+php at requinix dot net

Do you have one of those weird editors where shift+space produces something 
besides a regular space? It may sound stupid and probably won't change anything 
but try deleting the "LIKE ?" and typing it again carefully.

Also stupid and pointless, check that
  echo bin2hex($cond);
ends in "...4c494b45203f".


[2013-01-23 18:21:39] krak...@php.net

[joe@fiji php-5.4.6]$ nano 64057.php
[joe@fiji php-5.4.6]$ sapi/cli/php 64057.php
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE %é%

Anyone else ??

--------
[2013-01-23 17:54:21] ltsujiguchi at gmail dot com

Description:

I had a problem when i used the substr_replace, using those changes os php.ini:

I couldn't find the exact version of my php on the drop, so i put the closest 
version, but my real version is the 5.4.6.

Result expected:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE %é%

Result returned:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE%é%?

Test script:
---
$replacement = '%é%';
$cond = 'noticia.noticia_titulo LIKE ? OR noticia.noticia_conteudo LIKE ?';
$posItem = stripos($cond, '?');
$cond = substr_replace($cond, $replacement, $posItem, 1);
$posItem = stripos($cond, '?');
$cond = substr_replace($cond, $replacement, $posItem, 1);
echo $cond;







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64057&edit=1


[PHP-BUG] Bug #64057 [NEW]: substr_replace failed charset utf-8

2013-01-23 Thread ltsujiguchi at gmail dot com
From: ltsujiguchi at gmail dot com
Operating system: Ubuntu 12.10
PHP version:  5.4.11
Package:  Strings related
Bug Type: Bug
Bug description:substr_replace failed charset utf-8

Description:

I had a problem when i used the substr_replace, using those changes os
php.ini:

I couldn't find the exact version of my php on the drop, so i put the
closest 
version, but my real version is the 5.4.6.

Result expected:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE %é%

Result returned:
noticia.noticia_titulo LIKE %é% OR noticia.noticia_conteudo LIKE%é%?

Test script:
---
$replacement = '%é%';
$cond = 'noticia.noticia_titulo LIKE ? OR noticia.noticia_conteudo LIKE
?';
$posItem = stripos($cond, '?');
$cond = substr_replace($cond, $replacement, $posItem, 1);
$posItem = stripos($cond, '?');
$cond = substr_replace($cond, $replacement, $posItem, 1);
echo $cond;


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