Здравствуйте, господа!
Помоги, плз, со следующей проблемой.
Предыстория.
В таблице "А", в поле "а" лежат данные в формате ХМL.
Используя com.ibm.db2.jcc.DB2Driver (от поставки DB2 9.5),
достаем данные, изменяем и кладем в таблицу "B" в поле "b".
Делаем запрос а ля:
1.
2.
XQUERY for $cur in db2-fn:xmlcolumn('B.b')/root/row_value
return $cur
И получаем:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL20412N Serialization of an XML value resulted in characters that could not
be represented in the target encoding. SQLSTATE=2200W
SQL20412N Serialization of an XML value resulted in characters that could not be represented in the target encoding.
Explanation:
Serialization of XML data may require conversion to an encoding
different from the source UTF- 8 encoding. If characters exist in the
source encoding that cannot be represented in the target encoding, code
page conversion produces substitution characters which are not allowed
in the result of XML serialization.
User response:
Choose a target encoding that can represent all characters in the XML
value. Unicode encodings are recommended as they can represent all
characters.
sqlcode: - 20412
sqlstate: 2200W
Аналогичный запрос на поле "а" из таблицы "А" выдает XML с данными.
Когда открываю данные в центре управления из обеих таблиц,
данные отображаются одинаково.
Только прибавляется строка <?xml version="1.0" encoding="UTF-16" ?>
хотя база была создана как UTF-8.
Где собака зарыта?
Подскажите, плз.
Заранее благодарен.