Encoding Characters in the Meridium APM Web Framework URL

Web browsers cannot read certain characters, such as spaces, in URLs. Each character, however, has a corresponding encoded value that can be interpreted by web browsers. For URLs to work properly, each character in the URL must be in a format that can be read by the web browser. In cases where the web browser is able to read the character itself, the non-encoded character can be used. In cases where the web browser cannot read the character itself, the encoded value must be used. Encoding can be done manually, but most web browsers provide an automatic encoding mechanism that can translate non-encoded URLs into encoded URLs at runtime.

Most letters and numbers in the ASCII character set can be properly read by web browser without any special encoding. A certain set of "unsafe" or "reserved" characters must always be encoded. For your easy reference, a list of reserved characters is provided in this documentation.

The Meridium APM Framework application is capable of reading most of the reserved characters. Therefore, special encoding is not needed in the Meridium APM Framework application. To make the corresponding URLs usable within the Meridium APM Web Framework, however, encoding is necessary.

For example, consider the following URL, which opens a query called Equipment Query in the Meridium APM Framework application:

meridium://Registry/QueryBuilder?QueryPath=Public\Meridium\Queries\Equipment Query

Now consider the corresponding Meridium APM Web Framework URL:

http://Server/MeridiumWeb/apm/Registry/QueryBuilder.aspx?QueryPath=Public\Meridium\Queries\Equipment Query

This URL contains one reserved character: the space in the query name. This character must be encoded in order to be read properly by web browsers. Since the encoded value for the space character is %20, the encoded URL would be:

http://Server/MeridiumWeb/apm/Registry/QueryBuilder.aspx?QueryPath=Public\Meridium\Queries\Equipment%20Query

In most case, any necessary encoding will be done by the web browser when the URL is executed. Therefore, you should be able to construct the Meridium APM Web Framework URLs without encoding. When you use them, the web browser will encode the URL for you and display the encoded value in the Address field.

For example, consider a Home Page link that is constructed using the following URL:

http://Server/MeridiumWeb/apm/Registry/QueryBuilder.aspx?QueryPath=Public\Meridium\Queries\Equipment Query

When a user clicks the link, Internet Explorer will encode the space automatically and display the following URL in the Address field:

http://Server/MeridiumWeb/apm/Registry/QueryBuilder.aspx?QueryPath=Public\Meridium\Queries\Equipment%20Query

Keep in mind that encoding of special characters is necessary for URLs to work properly in the Meridium APM Web Framework. While the encoding will be done automatically by the web browser in most cases, if you find that any of your URLs are not working as expected, make sure that all the special characters have been properly encoded. If they have not, you may need to do the encoding manually.

Copyright © 1993-2016 Meridium, Inc. All rights reserved.