How do I encode currencies with XHTML and HTMLTIdy?

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
SamJollyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Jagadishwor DulalConnect With a Mentor Braces MediaCommented:
Try changing UTF-8 and use  £ or £ there should not be problem
0
 
SamJollyAuthor Commented:
I have tried using "£" and defining the input and out character encoding as UTF-16. However I get little vertical rectangles.....

Sam
0
 
SamJollyAuthor Commented:
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
 
SamJollyAuthor Commented:
thks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.