The EncodingTyper, a Nucleus component located at /atg/dynamo/servlet/pagecompile/
EncodingTyper
, defines the encoding that an Oracle ATG Web Commerce server uses to deliver locale-specific content to the user. If the site is configured to serve content to one locale, the EncodingTyper simply uses the defaultEncoding. If the site is configured to deliver content to multiple locales, the EncodingTyper recognizes the document’s encoding through a portion of the content’s directory path. It checks the content path for a set of patterns that denote the content’s encoding. After an Oracle ATG Web Commerce server has determined the encoding, the page compiler compiles the page. The compiled page is stored in a directory that includes the encoding as a suffix in the directory file name.

In a multi-locale site, an Oracle ATG Web Commerce server can determine which encoding to use only if the documents are separated in the document root by directories that identify the language (or encoding) of the documents. The directory names must follow a definable pattern. See Content Page Directories for more information. An Oracle ATG Web Commerce server recognizes the pattern of content directories and which encodings the directories map to based on the configuration of the encodingMappings and pathPatternPrefixes properties in the EncodingTyper. If none of the site’s locale-specific encodings is found for the file, the encoding defined by the defaultEncoding property is used.

The EncodingTyper also provides character data converters for a given encoding. When a browser posts form data, there is no identifying field from the browser that indicates which encoding the data is in. The EncodingTyper determines the encoding of the data that is posted and provides a Converter to convert the data from its native encoding to Unicode for use by an Oracle ATG Web Commerce application.

In addition to configuring the EncodingTyper, you might have to configure the DynamoHandler and RequestLocale components. For more information see the Configuring the Request Locale section in this chapter.

Note 1: The encoding that is defined by the EncodingTyper determines the character set that is specified in the HTTP header.

Note 2: The EncodingTyper discerns the document’s encoding exclusively through the directory path. The EncodingTyper ignores all HTML meta-tag encoding information.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices