inm logo
Corporate Website | Contact | Store | Support | Login  
     


Knowledgebase
View categorized listing of all common frequently asked questions.
Downloads
View our categorized library of downloads for all necessary manuals, software, etc.
 Article Options
Support Center » Knowledgebase » INM V12 Database for Director » Handling double-byte content
Support Page Banner
 Handling double-byte content
Product:Platform:Area:Version:
INM V12 Database for Director Windows, Macintosh General database and table use 3.x Regular & Light

Summary

INM V12 Database is 100% compliant to single-byte languages. It can properly index, sort and search strings of any single-byte language in addition to allowing for the definition of custom sort and search orders. However, INM V12 Database contains the following limitations with respect to double-byte languages.

Example

Storing and retrieving data

Double-byte strings can be successfully stored and retrieved from V12 Database fields of type String. The calls to INM V12 Database are identical to those used for single-byte strings (see Step 5: Implementing the User Interface).

To store a double-byte string:

mEditRecord(gTable)
mSetField(gTable, "name", aName) -- a Name is double-byte mUpdateRecord(gTable)

To retrieve a double-byte string:

set aName = mGetField(gTable, "name")

You can also store and retrieve styled double-byte strings with the following calls:

mSetField(gTable, "name", member 5 of castlib "V12stuff")
mGetField(gTable, "name", member 5 of castlib "V12stuff")

See "Managing styled text" in V12 manual for details on the storage and retrieval of styled text.

Indexing, searching and sorting Data

The indexes of INM V12 Database version 3.0 are not designed to handle double-byte strings. This implies the following limitations on the queries that can be expressed for searching (see Searching Data with mSetCriteria).

The Equal and <> operators works properly, as with single-byte languages.

The Starts operator can fail in certain circumstances, such as when an odd number of bytes is searched with mSetCriteria.

The Contains operator finds all records that match the specified criteria, but can also find additional records that don't (Remember: the contains operator does not take advantage of indexes. It is therefore slow).

The >, <, >=, <= operators will fail most of the time. They would work properly only in exceptional cases where the sort order of each stored double-byte string happens to match the numeric (i.e. single-byte) ordering of that string.

WordEquals and WordStarts cannot be used because, unlike single-byte languages, delimiting words in double-byte languages require language-specific dictionaries.

Note

A convenient and easy way to work around the above limitations is to manage double-byte strings as if they were media. That is, only use them for the purpose of storage and retrieval, and use additional fields of type Integer or single-byte String to store codes that would determine the searching behavior and sorting order of the corresponding double-byte strings. Either fields of type String or Media can be used to store such double-byte strings.



Article Details
Article ID: 107
Created On: 26 Sep 2006 02:32 PM

 This answer was helpful  This answer was not helpful

inm general footer
Services Xtras Go Products Support Gallery Store Download About Us Contact Newsroom