Developer’s Guide

Table Of Contents
7-8
Developer’s Guide
About UTF-8 encoded data
All XML data generated by the Web Companion is encoded in
UTF-8 (Unicode Transformation 8 Bit) format. This format
compresses data from the standard Unicode format of 16 bits to 8 bits
for ASCII characters. XML parsers are required to support Unicode
and UTF-8 encoding.
UTF-8 encoding includes direct representations of most of the
characters used in English using values of 0-127 for the standard
ASCII set of characters, and provides multibyte encodings for
Unicode characters with higher values. UTF-8 encoded data is
compressed almost in half (lower ASCII characters are compressed
from 2 bytes to 1 byte), which helps data download faster.
Note Because your XML data is UTF-8 encoded, some upper ASCII
characters will be represented by 2 or 3 characters in the text editor—
they will appear as single characters only in the XML parser or
browser.
The UTF-8 encoding format includes the following features:
1 All ASCII characters are one-byte UTF-8 characters. A legal
ASCII string is a legal UTF-8 string.
1 Any non-ASCII character (i.e., any character with the high-order
bit set) is part of a multibyte character.
1 The first byte of any UTF-8 character indicates the number of
additional bytes in the character.
1 The first byte of a multibyte character is easily distinguished from
the subsequent bytes. Thus, it is easy to locate the start of a character
from an arbitrary position in a data stream.
1 It is easy to convert between UTF-8 and Unicode.
1 The UTF-8 encoding is relatively compact. For text with a large
percentage of ASCII characters, it is more compact than Unicode. In
the worst case, a UTF-8 string is only 50% larger than the
corresponding Unicode string.
Generating FileMaker Pro CGI requests for
an XML document
You use FileMaker Pro CGI (Common Gateway Interface)
commands to generate requests for XML data from your database.
For example, to generate a –find request to display all employees
from a database, web users might click on a link containing the
following FileMaker Pro CGI command:
FMPro?–db=employees.fp5&–format= –dso_xml&
–styletype=text/css&–stylehref=stylesheet.css&–find
Request and parameter names
The following tables list the request and parameter names in name/
value pairs you can use in a FileMaker Pro CGI command when
requesting data in XML format.
For more information and examples, see appendix B, “Valid names
used in FileMaker CGI requests for XML data.”
Use this
request name To generate this request
–new New record
–edit Edit record
–delete Delete record
–find Find record(s)
–findall Find all records
–findany find a random record
–view View layout info (in FMPXMLLAYOUT grammar)
–dbnames Retrieve names of all open and web-shared databases
–layoutnames Retrieve names of all available layouts for a specified
open, web-shared database