473,508 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[DB2 V9] Problem with Unicode in XML fields

Hello

I'm using DB2 Express-C V9 with FixPack2 on CentOS.
I have database created with territory PL.
I'm using it with WebApplication written in PHP, the pages are encoded in
UTF-8.

I'm writing some data to XML, that contains polish characters. And that's
where problem begins ;-)
It's encoded with some crazy charset and products buggy chars.
When it's nonpolish chars it's ok, it's screwing up when there're some
polish chars.

Did anybody encountered such problem?
I think it's true to other not standard characters.

TIA for help.
--
Best regards,
Piotr Baranowski
Jun 15 '07 #1
7 3171
On Jun 15, 9:19 am, Piotr 'Zenobius' Baranowski
<zenob...@noskasujto.zeno.plwrote:
Hello

I'm using DB2 Express-C V9 with FixPack2 on CentOS.
I have database created with territory PL.
I'm using it with WebApplication written in PHP, the pages are encoded in
UTF-8.

I'm writing some data to XML, that contains polish characters. And that's
where problem begins ;-)
It's encoded with some crazy charset and products buggy chars.
When it's nonpolish chars it's ok, it's screwing up when there're some
polish chars.

Did anybody encountered such problem?
I think it's true to other not standard characters.

TIA for help.
--
Best regards,
Piotr Baranowski

Did you try entering the XML data from the command line ?
Does that work (with Polish characters) ?

Jun 16 '07 #2
Piotr 'Zenobius' Baranowski wrote:
Hello

I'm using DB2 Express-C V9 with FixPack2 on CentOS.
I have database created with territory PL.
I'm using it with WebApplication written in PHP, the pages are encoded in
UTF-8.
Silly question: did you create database in Unicode?

Jan M. Nelken
Jun 16 '07 #3
On Jun 15, 6:19 pm, Piotr 'Zenobius' Baranowski
<zenob...@noskasujto.zeno.plwrote:
Hello

I'm using DB2 Express-C V9 with FixPack2 on CentOS.
I have database created with territory PL.
I'm using it with WebApplication written in PHP, the pages are encoded in
UTF-8.

I'm writing some data to XML, that contains polish characters. And that's
where problem begins ;-)
It's encoded with some crazy charset and products buggy chars.
When it's nonpolish chars it's ok, it's screwing up when there're some
polish chars.

Did anybody encountered such problem?
I think it's true to other not standard characters.

TIA for help.
--
Best regards,
Piotr Baranowski
Hello,

You have to open db2cmd and type: db2set db2codepage=1208 This setting
avoid convertion of DB2 charset (if you prepare database for XML, DB2
always set UTF-8 encoding) to system charset.

Marcin Molak

Jun 17 '07 #4
Dnia Sat, 16 Jun 2007 16:01:51 -0400, Jan M. Nelken napisał(a):
Piotr 'Zenobius' Baranowski wrote:
>Hello

I'm using DB2 Express-C V9 with FixPack2 on CentOS.
I have database created with territory PL.
I'm using it with WebApplication written in PHP, the pages are encoded in
UTF-8.

Silly question: did you create database in Unicode?
Yep, i had to. XML type requires that :-)

--
Pozdrawiam bądź nie.. [ GG# 997057 ]
Piotr Baranowski
Owiec Hardcore'u z Generacji-D
Zenobius Hermenegildorf Xavierus 'Korpuskularny'
Jun 17 '07 #5
Did you try entering the XML data from the command line ?
Does that work (with Polish characters) ?
I've entered it thru Workbench and it worked well.

--
Best regards.. or not..
Piotr Baranowski
Owiec Hardcore'u z Generacji-D
Zenobius Hermenegildorf Xavierus 'Korpuskularny'
Jun 17 '07 #6
Hello,
>
You have to open db2cmd and type: db2set db2codepage=1208 This setting
avoid convertion of DB2 charset (if you prepare database for XML, DB2
always set UTF-8 encoding) to system charset.

Marcin Molak
Thanks, that was the problem.

--
Best regards,
Piotr Baranowski
Owiec Hardcore'u z Generacji-D
Zenobius Hermenegildorf Xavierus 'Korpuskularny'
Jun 17 '07 #7
Thanks, that was the problem.
be careful with that setting though. DB2 will assume all data being
fed to it is UTF8 and any other applications that rely on system code
page conversion from system charset to UTF8 will not work correctly.

Jun 20 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7515
by: Daman | last post by:
Hi, I am currently facing difficulty displaying chinese, japanese, russian etc. characters. I am using VB 6 and ADO to query the DB2 Version 7.2 unicode database (UTF-8). The resultset that...
6
7734
by: Kanv | last post by:
Hi, I am setting up a database which requires some tables to store Thai language data, as well as English data. For this, during the DB creation of the test database, I set the following...
8
3259
by: zahidal | last post by:
hello, i am facing a problem with a db2 database created with utf-8 character set. My db2 server is running on windows 2000 server, client is on another machine that is also running windows 2000...
0
4220
by: Tim Northrup | last post by:
Help! We have DB2 V7.2 (fixpak 12) installed on Windows2003 Server, and the latest V7.2 client installed on another system. The DB2CODEPAGE on all systems is set to 1208, and the database was...
3
7372
by: Kieran Green | last post by:
Greetings, We are building an application written for Windows in C++ which uses OLEDB to connect to AIX DB2 8.2. Our app stores all string data in the wchar_t datatype, which generates dynamic...
3
8419
by: mailar | last post by:
HI, Can anyone tell me how is a multi_byte to single byte and vice versa conversion done in DB2. It would be great even if someone can tell me how Oracle does it? Oracle already has functions...
14
2512
by: Dennis Benzinger | last post by:
Hi! The following program in an UTF-8 encoded file: # -*- coding: UTF-8 -*- FIELDS = ("Fächer", ) FROZEN_FIELDS = frozenset(FIELDS) FIELDS_SET = set(FIELDS)
1
3368
by: oregondba | last post by:
We are attempting to load a DB2 v9 table with SQL Server Integration Services. The DB2 data exists on AIX and is built with a codeset of 1252. The SSIS server has the DB2 V9 client and we are...
3
2512
by: globomike | last post by:
Hi, I am looking for a function (or hint) how I can count unicode characters (and not bytes) in DB2 V8.2. In DB2 9 the length function is extenced with the codeunits32 option - and this is...
0
7132
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7401
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5640
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.