Convert html from decimal form to original charset?

Well, there is a problem. We run a server that has been set up to use many different charsets. Same server are running websites in arabic, chinese, russian, english and more…

And that gives me one serious problem in one db.

When the user create the form he/she writes in the local language. As an example one user added text to their 404-error page. The text is a keyword and prints in the browser as:

Nemůžeme nalézt stránku, kterou hledáte.

But the source html is in the decimal form:

Nemůžeme nalézt stránku, kterou hledáte.

So for some localized characters the server transform them into decimal format and they gets displayed correct in the browser.

Problem I have:

I print the text “as is” in some places from and LS-agent and that means I print the decimal form. If I pushed the same phrase into an alert the alert text would contain “Nemůžeme” and NOT “Nemůžeme”.

I have tried to run it through

Evaluate(|@URLDecode(“Domino”;“| & keyword & |”)|). I have tried UTF-8 and other charsets. I have tried first to Encode and then decode the result.

No matter what I do, I always end up with outputting the plain text Nemůžeme.

Is there any way I can work around this codewize? I need to go back to the original char since the text is published the wrong way.

I have also tried to rewrite the keyword WITH hexcode… no dice.

The input text seems to be constant in decimal form… and I need some kind of conversion… any help, ideas, tips?