on 07-08-2016 2:44 AM
Hi Gurus,
I am facing an issue to export Non-English characters into an XML file using XML EXPLICIT.
Any idea how I can export the correct Non-English data into a XML file.
1. My DB file has character set encoding - windows-1252 (ASCII)
2. I converted a column data type to NVARCHAR from VARCHAR
3. The Non-English data saves correctly now
4. But when I export the data into XML file, it gives me error "control character in XML output"
Question 1 - Is there s way I can fix this problem in this scenario ?
I also tried another scenarioby changing the DB file to UTF-8 encoding and keeping NVARCHAR
Now, when I am extracting the XML File, I am not getting the error but the output for that particular Non-English character is '??'.
Question 2 - Is there to get the correct Non-English data in the output file.
Thanks
Ramendra
Hi Ramendra,
What is the version of SQL Anywhere? Does the OS use Windows?
How did you create DB?
How did you export data? (ISQL - Data - Export(xml)?)
What are the Non-English data? (what language?)
>it gives me error "control character in XML output"
This error message is explained by the following manuals.
Did you confirm this manual?
Control character in XML output
http://dcx.sap.com/index.html#sqla170/en/html/80eb9d306ce21014849ee25c5be58b79.html
Thanks,
Atsushi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Atsushi
It's SQL Anywhere 10 and I also tried on 16, the OS is windows.
It's an OLD DB used from long time on window-1252 encoding (ASCII).
I changed the data type of a column to NVARCHAR and able to store Non-English character (which was not storing when it was VARCHAR).
I am using XML EXPLICIT command to get the OUTPUT in ISQL's result section.
But it give me the error of control character.
The data I have is Chinese character (Traditional) of the name "Sydney" (in English), I did the google translate to capture and store the data into Chinese character.
But I can have the data in any language and need to be internationally accepted character set.
I check the manual and it say to convert the data into LONG BINARY and I tried it too and it don't give the error but what I will do with this BINARY data if I can't present it properly.
This was till I was using the OLD encoding.
So, I also create a fresh DB (through wizard) with UTF-8 encoding with the hope that this should work. Although it don't give me error but the output is "??".
What I do with this OUTPUT too
Any help be much appreciated.
Thanks
Ramendra
I have tested with SQL Anywhere 16.0.0.2283.
CHAR / NCHAR collation: UTF8BIN
CHAR / NCHAR charater set encoding: UTF-8
The column is NVARCHAR.
The simplified Chinese characters are stored in the column and can be displayed correctly in SQL Central and InteractiveSQL.
For exporting them into an XML file: output to 'c:\test\output.xml' FORMAT XML;
The XML file that has been generated includes the correct simplified chinese characters.
Thank Micro for doing a test for me, I also created a small app with a single table and able to save and extract the Non-English characters.
I tried saving in multiple languages with success.
I am not sure why it is not doing correctly in my the production copy of the database.
I think I might need to check and see where and what I am doing wrong.
Regards
Ramendra
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.