Try OpenEdge Now
skip to main content
Administration
WebSpeed Administration : WebSpeed Dynamic Code-page Support : How dynamic code-page support works
 

How dynamic code-page support works

In dynamic code-page support, each Web request sent by the browser indicates, directly or indirectly, the name of the code page it is encoded in. The developer modifies the application to make this happen. Typically, the initial Web page of the application displays a preselected list of languages or nationalities, from which the user selects.
When a Web request reflecting a response to a language-selection page is received by the agent, the application does the following:
1. Notes the language or nationality selected
2. Determines the corresponding code page
3. Determines the MIME version (as opposed to the OpenEdge version) of the code-page name
4. Converts the MIME version of the code-page name to the OpenEdge version
5. Sets a cookie called wscharset to the MIME version of the code-page name
Or:
Sets a query field or a hidden-form field called wscharset to the MIME version of the code-page name
When a Web request reflecting a response to a Web page other than a language-selection page is received by the agent, WebSpeed's web-disp.p procedure:
1. Searches for the code-page name in a query field called wscharset or a hidden-form field called wscharset. If the code-page name was not found, it searches in a cookie called wscharset.
2. Converts the code-page name from MIME format to OpenEdge format and stores the result in the WEB-CONTEXT handle's HTML-CHARSET attribute.
Then, the application ensures that the MIME version of the code-page name will appear in the Web page the application will create. The technique used depends on whether the Web page is created using static HTML or dynamic HTML. For example:
*If the Web page is created using static HTML, the application should contain a META tag with the MIME version of the code-page name, as in the following:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset="windows-1250"">
*If the Web page is created using dynamic HTML, the application uses the OUTPUT-CONTENT-TYPE() WebSpeed API function to insert the MIME version of the code-page name into the HTML document.
Once WebSpeed's web-disp.p procedure stores the OpenEdge version of the code-page name in HTML-CHARSET, the agent uses HTML-CHARSET to perform the following code-page conversions:
1. Just after an incoming Web request is received, the agent converts it from the HTML-CHARSET code page to the agent's CPINTERNAL code page.
2. Just before an outgoing Web page is sent, the agent converts it from the agent's CPINTERNAL code page to the HTML-CHARSET code page.