Solved

strange character on text

Posted on 2011-02-28
7
385 Views
Last Modified: 2012-05-11
Hi EE,

we are parsing xml file from client and displaying on websites but some websites are displaying strange character like Â

i tried to replace   character but does not  solve the issue.

what is the character and why it is only affecting some websites.

how to remove it?

Thanks
0
Comment
Question by:saloj
7 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
Comment Utility
I guess this is an issue with the font you are using and the (different) font on the end users PC.
0
 
LVL 8

Expert Comment

by:PagodNaUtak
Comment Utility
Can you show us the xml file? And does the client uses differrent language?
0
 
LVL 10

Expert Comment

by:John Claes
Comment Utility
Is this not a standard issue of Encoding?
The Encoding of the Xml is different from the encoding of the website.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 29

Expert Comment

by:Kumaraswamy R
Comment Utility
HI
This is  problem with encoding
bellow ur give some information
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_23813008.html
0
 
LVL 17

Expert Comment

by:selvol
Comment Utility
The rouge charater could be Arabic words being shown in a single byte English font. If you aren't using double byte (Unicode) .?????
0
 
LVL 2

Author Comment

by:saloj
Comment Utility
Hi Guys
I guess, it should be issue of encoding. while I am saving my xmlData on UTF-8 format and send the file to many websites and some parse well and some display with that strange character.

here is my code, i use to write xml data on file.

Thanks
strXml = XMLDATA;

System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
byte[] data = encoding.GetBytes(strXml.ToString());
string xmlParseData = encoding.GetString(data);
                
using (StreamWriter sw = new StreamWriter(xSavePath))
{
sw.WriteLine(xmlParseData);
sw.Close();
}

Open in new window

0
 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 500 total points
Comment Utility
try


using (StreamWriter sw = New System.IO.StreamWriter(filename, True, System.Text.Encoding.GetEncoding("windows-1252"))

{
sw.WriteLine(xmlParseData);
sw.Close();
}
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now