Javascript unescape

In one of my applications I use the results from google ajax api
(which outputs JSON) and I’m getting an unescaped string like this:

“Sam\u0026#39;s Home Page”

which is basically :

“Sam’s Home Page”

what is happening here is like this (my guess from observation):

’ (apostrophe) is escaped by HTML first so it becomes => ’
’ is escaped by javascript and it becomes \u0026#39;

Though I can unescape the text on client side (using javascript
unescape method) but I do need some implementation like this on the
server also.

I have googled a lot and found that there is no equivalent of
javascript escape and unescape for any language since they are
dependent on current character encoding of HTML page.

Further I have tried the CGI.unescapeHTML and CGI.unescape methods
also, that too din’t helped.

any help ?