var obj = new Array();
obj[obj.length] = "str1";
obj[obj.length] = "str2";
obj[obj.length] = "str &PlusMinus ing";
we noticed a problem when the HTML displayed the "±" value found in obj - it was some weird funky character, obviously corrupt. if I inspect page1.js, the "&PlusMinus" is the correct character. if I inspect scripts.jsp after the jsp:include and before it is sent to the browser, the "±" is corrupted. therefore, i can only come to the conclusion that the jsp:include is corrupting the character.
a) this is a problem for more than just ±
b) jsp:include doesn't seem to have a parameter or attribute that can be set re: charset
c) JSP documentation states that adding "charset:UTF-8" to the @page declaration has no affect on jsp:include
d) I cannot use the other "include" because our content is dynamic, not static
e) I cannot reference page1.js from the HTML directly because some of our pages are not actually in web-accessible locations
help! how does one get jsp:include to use the correct charset so not to corrupt the characters of the content being included?
Can you please define what "corrupted" means?
How did you determine it was corrupted?
If you try and load scripts.jsp directly, does it load the content you are after? (including in the view source?)
Joined: Jan 08, 2002
>> Can you please define what "corrupted" means? How did you determine it was corrupted?
Sure. And my mistake I left an important piece of info out... The ± is in an XML file that gets passed thru a Transformer (XSL) that generates page1.js. When it is in page1.js, it is no longer ± but C2B1. This was determined by opening page1.js in a HEX editor.
Following this, we used a debugger to see the result of scripts.jsp on the server before it is returned as the HTTP response. The character is no longer C2B1.
>> If you try and load scripts.jsp directly, does it load the content you are after? (including in the view source?)
If you mean enter the URL to scripts.jsp directly in the browser, the result is the same. Yes, we get the full content we expect but the character is corrupt.