Wrox Programmer Forums
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 5th, 2003, 07:37 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Quote:
quote:Originally posted by dkb
 Thanks again Joe,

Joe,

where can I get your hotmail address?

I am using:-

<xsl:output method="xml" encoding="utf-8" indent="yes"></xsl:output>

in the xslt document, it that what you were going to look for?

Thanks

Yes, you have conflicting encodings, can't you set encoding to "utf-16".

--

Joe
 
Old November 5th, 2003, 07:38 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Email address is on profile, or click icon above post.

--

Joe
 
Old November 5th, 2003, 09:43 AM
dkb dkb is offline
Authorized User
 
Join Date: Oct 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Joe,

The article at:-
http://msdn.microsoft.com/library/de...ltransform.asp

Indicates that the encoding attribute is ignored.

I want it to show UTF-8 (as this is how the output is encoded)

My only question now is how to I set the encoding on my TextWriter object?



 
Old November 7th, 2003, 04:13 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I haven't seen your code but a simple example would be:
Code:
xslt.Transform("file.xml", new StreamWriter(new FileStream("file.out",
FileMode.Create, FileAccess.ReadWrite), System.Text.Encoding.UTF8) );
Joe (MVP - xml)
 
Old November 7th, 2003, 09:05 AM
dkb dkb is offline
Authorized User
 
Join Date: Oct 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Very much Joe,

I had a go and the encoding element is now correct.

I really appreciate your help.






Similar Threads
Thread Thread Starter Forum Replies Last Post
encoding="utf-16" Problem francislang XSLT 7 April 10th, 2015 02:23 AM
Chapter 16 Fig 16-11 krsouthern BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 July 8th, 2008 12:11 PM
UTF-8 sebastian Classic ASP Basics 0 March 16th, 2005 08:22 AM
How to use Scriptupload + UTF-8 ? duydp Classic ASP Professional 1 October 20th, 2004 11:31 AM
UTF-8 msxml lpinho XML 4 January 28th, 2004 06:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.