CodeCharge Studio

International Character Set and File Encodings

According to the World Wide Web Consortium (W3C) "If a user agent (eg. a browser) is unable to detect the character encoding used in a Web document, the user may be presented with unreadable text. This information is particularly important for those maintaining and extending a multilingual site, but declaring the character encoding of the document is important for anyone producing XHTML/HTML or CSS."

To understand character sets and character encodings in more detail we recommend that you refer to the WC3 document at http://www.w3.org/TR/i18n-html-tech/#ri20030510.102757952

When working with CodeCharge Studio you will deal with character encodings at several levels:

Modifying and saving HTML templates (HTML Encoding)

When working with HTML templates CodeCharge Studio will save the HTML page using the character encoding specified by the META element. When creating new pages, the META declaration is inserted automatically based on the 'Default HTML Encoding' setting of the project. If such META declaration is removed from the page then the system encoding will be used.

It is recommended that all HTML pages are created and saved using the same encoding as the File Encoding, described below. When your page needs to contain characters in a different encoding you can use the META declaration to specify a different encoding for the HTML documents, for example:

<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">

When saving an HTML template CodeCharge Studio will then parse the HTML content and use the specified character set to encode the HTML file being saved. It should be noted that using such META declaration is an accepted standard that will also allow other programs (for example Macromedia® Dreamweaver®) to open and save the same HTML file using the specified encoding.

Note: when using the META declaration within includable pages the META tags will automatically be removed during project publishing since the parent's page charset encoding should be applied. The META declaration within includable pages will be used only to specify the encoding when editing the page using external HTML editors.

Modifying and saving programming code files (File Encoding)

When working with the programming source code, CodeCharge Studio by default saves the files using the encoding specified in the 'File Encoding' setting of the project.

Displaying HTML content in user's Web browser

During run-time a web application created with CodeCharge Studio reads the HTML template file, replaces the template tags (such as {Label1}) with dynamic database content and then sends the HTML output to the Web browser. You can specify the META declaration for the HTML page so that the web browser will use the character set specified for the page.

In certain programming languages, such as ASP and PHP, the META declaration will also be used to specify the response encoding, which is used to set the character set (for example ISO-LATIN-7) appended to the Content-Type header of the corresponding object.

For more information on character sets and encoding please refer to:

Note: The above information about encoding currently does not apply to .NET.

The HTML templates are converted to ASPX files and they utilize the same encoding as the files containing programming code. This is especially needed for compatibility with Visual Studio .NET. All.NET files (.html, .aspx, .cs and .vb) are saved in the encoding specified using the File Encoding setting of the project.


On-line, printable versions and updates