- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I have a dataset encoded in Latin1 and we are trying to create an XML file in UTF-8.
In generated XML file, a french character "รจ" is appearing as strange character (xE8)
Even I tried to change the dataset to UTF-8 before creating XML file, but still the strange character exists.
Requesting you to help me to resolve this issue
Thank you
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@sathasivam wrote:
Hi Tom,
Thanks for your response. Am using data set and I have already used the same in my code as below:
data com;
file "C:/temp/file1.xml";put '<?xml version="1.0" encoding="UTF-8"?>';
Thanks
That is just telling the future users of the resulting file to interpret the text as UTF-8. That is not going to make an difference to how SAS will write the values into the file.
data com;
file "C:/temp/file1.xml" encoding='utf-8';
put '<?xml version="1.0" encoding="UTF-8"?>';
...
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
HOW did you try to create the XML file?
If you are using data step and PUT statement to write it then make sure the ENCODING option is set on the FILE or FILENAME statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tom,
Thanks for your response. Am using data set and I have already used the same in my code as below:
data com;
file "C:/temp/file1.xml";
put '<?xml version="1.0" encoding="UTF-8"?>';
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@sathasivam wrote:
Hi Tom,
Thanks for your response. Am using data set and I have already used the same in my code as below:
data com;
file "C:/temp/file1.xml";put '<?xml version="1.0" encoding="UTF-8"?>';
Thanks
That is just telling the future users of the resulting file to interpret the text as UTF-8. That is not going to make an difference to how SAS will write the values into the file.
data com;
file "C:/temp/file1.xml" encoding='utf-8';
put '<?xml version="1.0" encoding="UTF-8"?>';
...
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Tom, It's working!!!!