Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling Special Characters in xml auto

Status
Not open for further replies.

fergmj

Programmer
Feb 21, 2001
276
US
I have a table called employees
it has an employeeid, firstname, lastname etc....

I have some data in the lastname column that has special characters -- tildas and such -- for international names.

In Query Analyzer I have:
sp_makewebtask @outputfile = 'c:\temp\myxmlfile.xml',
@query = 'select * from employees for xml auto',
@templatefile = 'c:\temp\template.tpl'

When I run this command, the data comes out like this:

LastName="MARTÃ?N"

when it should be LastName=MARTÍN

Anyone know how I can correct this?

Thanks

fergmj

 
I found the answer so i though I would post it:

In my template file, I needed to escape the characters that were a problem -- example --

<%EscapeHTML ~'%>

The data coming from the select statement was good -- and I verified it by exporting the data to a .txt file instead of an xml.
 
I'm glad you found a solution.


sp_makewebtask is retained for backward compatibility. New Web pages are more easily created using Microsoft SQL Server 2005 Reporting Services (SSRS).

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top