473,668 Members | 2,639 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 3174
On Jun 15, 9:19 am, Piotr 'Zenobius' Baranowski
<zenob...@noska sujto.zeno.plwr ote:
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...@noska sujto.zeno.plwr ote:
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=120 8 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=120 8 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
7543
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 comes back contains garbage characters for Chinese, Russian etc languages. The english characters come back fine using ADO. It seems that DB2 assumes that my application is NOT Unicode compliant.
6
7743
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 properties for the DB: -Database territory= TH -Database code set= UTF-8 and DB2 set these values by default: -Database code page= 1208
8
3270
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 server. installation of db2 is default on both client and server. after creating database i cant insert any japanese/bangla character in the database. then i test the font settngs of both db2 server and client from Control centre and found that...
0
4235
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 created with code set UTF-8 / codepage 1208. (Note: Running our test application described below on the database host as opposed to a separate client system produced the same results as described below). When we perform an INSERT statement...
3
7384
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 SQL, typically with bound parameters DBTYPE_WSTR, and so is a Unicode app. We don't know whether to use the vargraphic datatype for storing strings, or varchar, and which database character sets to support.
3
8465
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 called to_single_byte and to_multi_byte which convert a given multi byte character to single byte and vice versa respectively. thanks in advance mailar
14
2528
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
3382
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 using the OLE/ DB driver. When we try and connect the two SSIS insists that we have to treat the char (and varchar) data as Unicode. At this point I believe the issue is most likely being caused by either SSIS or the DB2 OLE/DB driver. Has...
3
2533
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 exactly what I need in DB2 V8.2. Can anybody help me with that? Thanks in advance
0
8381
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8893
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8797
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6209
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5681
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4205
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4380
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1786
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.