public inbox for gentoo-server@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-server] Charset problem with odbc connection on AS400
@ 2005-09-09 14:09 KRAFT Benjamin
  2005-09-09 14:27 ` Patrick Lauer
  0 siblings, 1 reply; 4+ messages in thread
From: KRAFT Benjamin @ 2005-09-09 14:09 UTC (permalink / raw
  To: gentoo-server

[-- Attachment #1: Type: text/plain, Size: 3246 bytes --]

Hello the list,

I'm writing here this mail because of incorrect characters displaying when
getting informations from one AS400 and trying to display it on a web page
with php.

My server is running debian linux, and the unixODBC driver that i downloaded
from ibm's web page is the following :

iSeriesODBC-5.1.0-0.16.i386.rpm

*here is my /etc/odbcinst.ini :
[iSeries Access ODBC Driver]
Description             = iSeries Access for Linux ODBC Driver
Driver          = /opt/ibm/iSeriesODBC/lib/libcwbodbc.so
Setup           = /opt/ibm/iSeriesODBC/lib/libcwbodbc.so
Threading               = 2
FileUsage               = 1
DontDLClose             = 1

*here is my /etc/odbc.ini :
[Pos400]
Description = test to as400
Driver = iSeries Access ODBC Driver
Server = as400
System = as400
DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512
AllowUnsupportedChar = 1
DefaultLibraries        = QGPL
ConnectionType          = 2
CommitMode              = 1
ExtendedDynamic         = 0
DefaultPkgLibrary       = QGPL
DefaultPackage          = A/DEFAULT(IBM),2,0,1,0,512
AllowDataCompression    = 0
LibraryView             = 1
ForceTranslation        = 1
Trace           = 0

*Here is my php code :
<?
 $string = "";
 $hDB=odbc_connect( 'POS400','**user**','**pass**');
 if ( empty($hDB))
    {
    echo "no connection...";
    die();
    }else   {
            $sql = "select * from CONTRATS.CENDMI WHERE CC=3005 AND
NCONT='003005' and ORDMI=44";
            $resultat = odbc_exec($hDB, $sql);
            odbc_result_all($resultat);
        }

odbc_close($hDB);
?>

*This displays :
<table><tr><th>CC</th><th>NCONT</th><th>ORDMI</th><th>NLMISS</th><th>DESOE</
th></tr>
<tr><td>3005</td><td>003005</td><td>44</td><td>1</td><td>Inspection
approfondie de la chambre de combustion </td></tr>
<tr><td>3005</td><td>003005</td><td>44</td><td>2</td><td>Ramonage par
aspirateur ou proc_d_ chimique        </td></tr>

<tr><td>3005</td><td>003005</td><td>44</td><td>3</td><td>Nettoyage de la
buse _ fum_es                      </td></tr>
<tr><td>3005</td><td>003005</td><td>44</td><td>4</td><td>Contr_le de
l'_tanch_it_ des portes et carneaux    </td></tr>
<tr><td>3005</td><td>003005</td><td>44</td><td>5</td><td>Contr_le de
l'isolation                            </td></tr>
</table>

*This *SHOULD* be :
<table><tr><th>CC</th><th>NCONT</th><th>ORDMI</th><th>NLMISS</th><th>DESOE</
th></tr>
<tr><td>3005</td><td>003005</td><td>44</td><td>1</td><td>Inspection
approfondie de la chambre de combustion </td></tr>
<tr><td>3005</td><td>003005</td><td>44</td><td>2</td><td>Ramonage par
aspirateur ou procédé chimique        </td></tr>

<tr><td>3005</td><td>003005</td><td>44</td><td>3</td><td>Nettoyage de la
buse à fumées                      </td></tr>
<tr><td>3005</td><td>003005</td><td>44</td><td>4</td><td>Contrôle de
l'étanchéité  des portes et carneaux    </td></tr>
<tr><td>3005</td><td>003005</td><td>44</td><td>5</td><td>Contrôle de
l'isolation                            </td></tr>
</table>

And I really don't know why this accents are not displaying.
When doing the same request on windows, I get the accents displayed.

Does anyone have a clue ?

Thanks in advance.

BK

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3089 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-09 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-09 14:09 [gentoo-server] Charset problem with odbc connection on AS400 KRAFT Benjamin
2005-09-09 14:27 ` Patrick Lauer
2005-09-09 14:38   ` KRAFT Benjamin
2005-09-09 15:04     ` KRAFT Benjamin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox