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

* Re: [gentoo-server] Charset problem with odbc connection on AS400
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick Lauer @ 2005-09-09 14:27 UTC (permalink / raw
  To: gentoo-server

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

On Fri, 2005-09-09 at 16:09 +0200, KRAFT Benjamin wrote:
> Hello the list,
Hi!
> 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 :
Uhm ... please don't get me wrong, but what does that have to do with Gentoo?
Both machines involved run "something else" - why don't you ask on the
distribution-specific mailing lists?
> iSeriesODBC-5.1.0-0.16.i386.rpm
[snip]
> Does anyone have a clue ?
I don't, sorry. Maybe you should try to find some documentation from IBM?
> Thanks in advance.
Good luck

Patrick
-- 
Stand still, and let the rest of the universe move

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* RE: [gentoo-server] Charset problem with odbc connection on AS400
  2005-09-09 14:27 ` Patrick Lauer
@ 2005-09-09 14:38   ` KRAFT Benjamin
  2005-09-09 15:04     ` KRAFT Benjamin
  0 siblings, 1 reply; 4+ messages in thread
From: KRAFT Benjamin @ 2005-09-09 14:38 UTC (permalink / raw
  To: gentoo-server

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

> -----Message d'origine-----
> De : Patrick Lauer [mailto:patrick@gentoo.org]
> Envoyé : vendredi 9 septembre 2005 16:28
> À : gentoo-server@lists.gentoo.org
> Objet : Re: [gentoo-server] Charset problem with odbc connection on AS400
> 
> On Fri, 2005-09-09 at 16:09 +0200, KRAFT Benjamin wrote:
> > Hello the list,
> Hi!
> > 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 :
> Uhm ... please don't get me wrong, but what does that have to do with
> Gentoo?
Uhhhh sorry this unixodbc driver is installed on my gentoo box, as it is on
my debian testing box.


> Both machines involved run "something else" - why don't you ask on the
> distribution-specific mailing lists?
> > iSeriesODBC-5.1.0-0.16.i386.rpm
> [snip]
> > Does anyone have a clue ?
> I don't, sorry. Maybe you should try to find some documentation from IBM?
The IBM documentation doesn't tell about character encoding problems.

> > Thanks in advance.
> Good luck
> 
> Patrick
Benjamin

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

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

* RE: [gentoo-server] Charset problem with odbc connection on AS400
  2005-09-09 14:38   ` KRAFT Benjamin
@ 2005-09-09 15:04     ` KRAFT Benjamin
  0 siblings, 0 replies; 4+ messages in thread
From: KRAFT Benjamin @ 2005-09-09 15:04 UTC (permalink / raw
  To: gentoo-server

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

> -----Message d'origine-----
> De : KRAFT Benjamin [mailto:benjamin.kraft@synergies-msr.lu]
> Envoyé : vendredi 9 septembre 2005 16:39
> À : gentoo-server@lists.gentoo.org
> Objet : RE: [gentoo-server] Charset problem with odbc connection on AS400


Ok, found it, i had to specify the Cssid.

[Pos400]
Description = test to as400
Driver = iSeries Access ODBC Driver
Server = as400
System = as400
Ccsid = 819
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



[-- 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