Solved

strange character on text

Posted on 2011-02-28
7
391 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 35004611
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
ID: 35004646
Can you show us the xml file? And does the client uses differrent language?
0
 
LVL 10

Expert Comment

by:John Claes
ID: 35004718
Is this not a standard issue of Encoding?
The Encoding of the Xml is different from the encoding of the website.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 35004848
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
ID: 35004855
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
ID: 35004971
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
ID: 35006236
try


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

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

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

617 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