0

I have stored tamil content something as &agrave..........

But for some content it is stored as #2220.......

So while retrieving there arise a problem with it when I try to decode it as original tamil content.

How to convert the values from #2220........to &grave.......

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
Rekha
  • 449
  • 2
  • 15
  • 27
  • 2
    Welcome to SO. You will need to extend your question a lot to get any useful answers. You are not saying what technologies you are using to store what and in where. Very good basic reading on the issue is http://www.joelonsoftware.com/articles/Unicode.html – Pekka Jun 05 '10 at 14:04

1 Answers1

1

In XML, &#xxxx; is a hexidecimal character entity. It refers to a Unicode character U+xxxx.

In HTML, there is a set of named character entities, like à. You can use them in XML if your DTD includes their definitions.

In any case, any conforming XML parser will convert either one to the corresponding Unicode character. When you put your text into your database, ` was converted to a single unicode character. When you pulled it out, the mechanism you used to pull it out did not choose to represent it with the symbolic name, but rather it used the general hex form.

If you want symbolic names, chances are that you need to post-process to get them.

bmargulies
  • 97,814
  • 39
  • 186
  • 310