Solved

How do I encode currencies with XHTML and HTMLTIdy?

Posted on 2011-09-26
4
239 Views
Last Modified: 2012-05-12
Hi,

I am trying to sanitize HTML to XHTML using HTMLTidy.

I have "£" signs in my input HTML. However these seem to be getting corrupted. In GUI Tidy I not that the "£"s are coming as "A£" in the original HTML so no wonder there is corruption.

I am actually doing this conversion in a web app and I can specify the Input and Output encoding. However whatever I try I still get corruption.

Ideas please? This is driving me mad!!!

I could change the "£"s to "£" or "£" in the input HTML if that helps.

Thanks for any help.

Sam
0
Comment
Question by:SamJolly
  • 3
4 Comments
 

Author Comment

by:SamJolly
ID: 36602247
I have tried using "£" and defining the input and out character encoding as UTF-16. However I get little vertical rectangles.....

Sam
0
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 36672948
Try changing UTF-8 and use  £ or £ there should not be problem
0
 

Author Comment

by:SamJolly
ID: 36708316
Hi,

Thanks for the comment. Yes, I have changed to UTF-8 and use £. After research I found that .NET was corrupting theses entities and so I have changed my coding to use Bytes as opposed to straight strings and it now works.

Thanks,

Sam
0
 

Author Closing Comment

by:SamJolly
ID: 36708317
thks
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

911 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

22 Experts available now in Live!

Get 1:1 Help Now