Rekha
Rekha

Reputation: 449

storing tamil values in database

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.......

Upvotes: 0

Views: 294

Answers (1)

bmargulies
bmargulies

Reputation: 100013

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.

Upvotes: 1

Related Questions