Hi there, I'm a professional programmer, but I'm out of ideas here.

I use the InnerHTML attribute to extract the HTML-code inside a div and use it in a different program (written in Progress 4GL).

My problem is that the innerHTML-code doesn't match the written HTML-code...

Special character codes like &#[some number];, ë and € are converted to their characterset equivalents and shown like that.
So if I extract those, I no longer see the html-code for these characters, I get some weird characters which even cause errors in my external program, because the charset mismatches.
It also happens when you use an alert, so this will do if you want to test:
<input type="button" value="test" onClick="alert(document.getElementById('showtest').innerHTML);" />
<div id="showtest">test&euml;&euro;&nbsp;test</div>

So, is there are a way around this in JavaScript? I can't convert those characters to the Progress characterset before opening the page because the div is editable, a user can add special characters in between loading and the use of the javascript code...

FYI: it's for a Progress e-mail client.

Thanks for any information or suggestions, I've been thinking about a solition for quite some time, now.