I'm connecting to the db400 files directly via an odbc connection and
running the following sql statement:
select hcust, cast( cast(hname as varchar(30) ccsid 870) AS varchar(256)
ccsid 1208), cast( cast(had1 as varchar(30) ccsid 870) AS varchar(256) ccsid
1208), cast( cast(had2 as varchar(30) ccsid 870) AS varchar(256) ccsid
1208), cast( cast(had3 as varchar(30) ccsid 870) AS varchar(256 ccsid
1208), cast( cast(hpost as varchar(10) ccsid 870) AS varchar(256) ccsid
1208), hsdte, hcarr from ech
I'm then updating the sql table with the retrieved values where the sql
columns are defined as 'nvarchar'. As you say, I'm then just doing a simple
'select' statement to look at the data retrieved. This may - or may not - be
influenced by medium through which I'm viewing the data. Is there a way to
view the raw data or binary values so I can do the comparison?
AIDC Solutions Ltd
Direct: +44 (0)5603 218969
Mobile: +44 (0)7798 681636
Behalf Of CRPence
Sent: 28 October 2009 01:00
Subject: Re: [BPCS-L] Polish characters
Download and then convert... in two steps? If the data was
binary on Source system then transported as such, the hexadecimal
string that makes up the city name should be the same at the target
as it is on the source; of course before conversion. What is that
hex string, and did it in fact remain the same from the Source
system to the Target system for the download? If the data changed,
that is probably the [first] problem; review of what\how of the
download needs to be reviewed to ensure binary transport of that data.
vis str visual character names hex str 870
'Łódź' = LL620000 LO110000 LD010000 LZ110000 = x'BACE84B7'
'[ódŹ' = SM060000 LO110000 LD010000 LZ120000 = x'4ACE84B9'
What is meant in description of the visual appearance, the
glyphs, as they appear presented "in SQL"? Is that after the
conversion to Unicode and as retrieved from an SQL [Server]
database? If DB2 for i SQL, was the binary string inserted
unmodified into an EBCDIC character column with CCSID 870? Consider
that the interface to display the characters visually may not be
setup appropriately, so the best method to verify the data is using
its hex representation; if that is correct and the glyphs incorrect,
then only the presentation interface is in need of correction.
Derek Nickless wrote:
I'm trying to download some data from BPCS files that contain
Polish characters. I know that they are held in binary format on
the iSeries and I am trying to convert them into unicode to store
in a sql database. I've tried a number of code pages and the best
I've found is 870, but this doesn't give me the complete
translations. An example is the city name of 'Lodz' which - in
Polish - is 'Łódź', but appears as '[ódŹ' in sql.
As an Amazon Associate we earn from qualifying purchases.