php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27651 german special characters like ??? are not correct when opening a dbase-dataset
Submitted: 2004-03-19 05:33 UTC Modified: 2004-03-23 14:57 UTC
From: baer at bundes-verlag dot de Assigned:
Status: Not a bug Package: dBase related
PHP Version: 4.3.4 OS: SuSE Linux 8.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: baer at bundes-verlag dot de
New email:
PHP Version: OS:

 

 [2004-03-19 05:33 UTC] baer at bundes-verlag dot de
Description:
------------
i tried to open datasets with dbase_open() and dbase_get_record_with_names(). after doing so, all german special characters like ??????? are not correct as i can see with print_r(). so for german users (and others too) it's not possible to use dbase-import.

Reproduce code:
---------------
$dbase_identifier = dbase_open($file,2);
$max_records = dbase_numrecords($dbase_identifier);

for ($i=0; $i<$max_records; $i++) {
	$rec = dbase_get_record_with_names($dbase_identifier,$i);
        print_r($rec);
}



Expected result:
----------------
i'd like to have all the characters ??????? not being replaced by other ones like \n or nothing:

Array
(
    [ART_ID] => 3198
    [INSERTUSER] => ?bernahme 
    [EDITDAT] => 20030923
    [EDITUSER] => UPD_APREIS
    [ABI_UNTERR] => Erz?hlungen
    [deleted] => 0
)


Actual result:
--------------
instead of the german characters i get replaced ones:

Array
(
    [ART_ID] => 3198
    [INSERTUSER] => bernahme 
    [EDITDAT] => 20030923
    [EDITUSER] => UPD_APREIS
    [ABI_UNTERR] => Erz
                       hlungen                                       
    [deleted] => 0
)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-23 14:57 UTC] helly@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You must read the names with the character encoding you wrote it. Assuming you are runing the data writer on windows they use your windows char code which may be some Win1252 or whatever. Trying to display them with the browser would require them being in iso-8859-1 encoding. If you run IExplorer you can force the char encoding to be used. Anyway this is no php problem. However you may also try to work around it by using mbstring functions to convert the encoding once you know the input encoding.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 01:01:28 2024 UTC