gunarajesh / common-schema

Automatically exported from code.google.com/p/common-schema
0 stars 0 forks source link

json_to_xml - malformed charset on output #76

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Which version of common_schema are you using? (specify
revision+distribution)
2.2

Which component is failing? (specify the view, function, etc.)
function json_to_xml

What is the expected output? What do you see instead?
..."Kovoobrábění - zákazník"...

..."Kovoobráb?ní - zákazník"...

Can you provide with sample data?

(As of version 1.1), please provide output of
SELECT * FROM common_schema.status
common_schema   2.2 523 2015-06-03 
16:40:53    1   1   1   0   5.5.16-log  NO_AUTO_VALUE_ON_ZERO

Please provide any additional information below.

In function json_to_xml, both input and output are defined as charset utf8. 
Variable v_token doesn't have charset defined which causes output 
malformation...

changing from declare v_token text; to declare v_token text charset utf8; helps 
for me.

As input, I'm using data from table column defined as following:
CREATE TABLE `test_conditions` (
  `id_message` int(11) NOT NULL,
  `orig_conditions` text,
  .....
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Original issue reported on code.google.com by tomas.ze...@gmail.com on 18 Jun 2015 at 5:22