• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

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
0
SamJolly
Asked:
SamJolly
  • 3
1 Solution
 
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
 
Jagadishwor DulalBraces MediaCommented:
Try changing UTF-8 and use  £ or £ there should not be problem
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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now