| Home: Support: Search: |
How can I encode Reserved Characters that are used for HTML?
The problem occurs when using reserved characters in the HTML request
being sent back to the server to retrieve the barcode. Characters such as
%, +, and & are reserved for specific purposes, when they are seen in
the actual HTML text being sent, and the request for the barcode becomes
distorted when these characters are used. A good example is to try to use the plus (+) sign in the
encoded data; the barcode returns spaces everywhere the plus (+) sign is
encountered. This is due to the HTML processor translating the plus (+)
sign into a space. The recommended work-around according to the W3C is to replace the
reserved characters with the percent sign (ironically, this is the reason
that the percent sign is a reserved character) and the hexadecimal value
associated with the ASCII character. For instance, the hex value for the
percent sign is 25; therefore replace all instances of the percent sign with %25.
For the ampersand, the hex value is 26, so replace all instances in the
data to encode with %26. Therefore, if the data string is
1%1&2%07, change the string to 1%251%262%2507. Click for the complete ASCII chart. Products affected: ASP Barcode Server Component for IIS Advantage Package and Java Barcode Applets, Servlets, JavaBeans and Barcode Class Libraries
See also:
© Copyright 2002-2008 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.
|