Anonymous - 2011-12-12

I know it's not a javascript forum, but I wonder if there is a problem within
WH..

I have a problem with the javascript function String.fromCharCode()

when I write for example String.fromCharCode("101") it doesn't convert it into
a 'e' but into a space

for example :

<script language="javascript" >
     var test = 'g&#111;b&#101;rn&#97;';
     var reg=new RegExp('&amp;#0*([0-9]+);', 'g');
     test= test.replace(reg, String.fromCharCode("$1"));
</script>

The result is: "g b rn "

Any idea ?