|  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
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-10-06 05:05 UTC] altuhov at nm dot ru
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:
$cont="???????? ???????? ??????????";
// get author info and generate DocBook entry 
$n = sscanf($cont,"%s %s %s"); 

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

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-06 08:54 UTC]
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]
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:
 [2004-10-07 01:11 UTC]
If the system using russian locale?
 [2004-10-07 08:23 UTC] altuhov at nm dot ru
Windows XP SP2 English version, but Russian locale.
 [2004-10-12 19:40 UTC]
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]
Do you still expirience this problem?
 [2004-11-28 19:35 UTC] altuhov at nm dot ru
Todays PHP-5.1-dev build
 [2005-03-07 22:05 UTC]
Please try using this CVS snapshot:
For Windows:

 [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-2021 The PHP Group
All rights reserved.
Last updated: Sun Mar 07 03:01:23 2021 UTC