php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30333 fscanf() and() not working correctly with other then English language
Submitted: 2004-10-06 05:05 UTC Modified: 2005-03-15 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: altuhov at nm dot ru Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 5CVS OS: WinXP SP2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: altuhov at nm dot ru
New email:
PHP Version: OS:

 

 [2004-10-06 05:05 UTC] altuhov at nm dot ru
Description:
------------
Functions fscanf() and sscanf() is not working correctly with other then English language in the handle.

In my example was used Russian language.

Reproduce code:
---------------
<?php 
$cont="???????? ???????? ??????????";
// get author info and generate DocBook entry 
$n = sscanf($cont,"%s %s %s"); 
print_r($n);
?>

Expected result:
----------------
Array ( [0] => ???????? [1] => ???????? [2] => ?????????? )

Actual result:
--------------
Array ( [0] => ?? [1] => ??? [2] => ? )

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-06 08:54 UTC] derick@php.net
This example is useles, as we don't know which encoding you are using. Please put this script in a zip file and provide the link to it in this bugreport.
 [2004-10-06 10:02 UTC] tony2001@php.net
Btw, your example works perfectly for me (PHP 4.3.10-dev, 5.0.3-dev, 5.1-dev, Linux, locale ru_RU.koi8r).
 [2004-10-06 14:35 UTC] altuhov at nm dot ru
I have installed new version, but, bug is steel present.
sample script: http://altuhov.nm.ru/tt.zip
 [2004-10-07 01:11 UTC] iliaa@php.net
If the system using russian locale?
 [2004-10-07 08:23 UTC] altuhov at nm dot ru
Yes.
Windows XP SP2 English version, but Russian locale.
 [2004-10-12 19:40 UTC] iliaa@php.net
Is the russian locale used by winxp the same locale as the one used by the document?
 [2004-10-12 19:47 UTC] altuhov at nm dot ru
Yes. Windows-1251.
Reproduce code was writed and saved in the "Notepad".
 [2004-11-28 13:43 UTC] tony2001@php.net
Do you still expirience this problem?
 [2004-11-28 19:35 UTC] altuhov at nm dot ru
YES!
Todays PHP-5.1-dev build
 [2005-03-07 22:05 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-03-15 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC