[ Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters]

Arc de Triomphe clipart (2486 bytes)

UCSTRING: Unicode in Eiffel


Written by majkel kretschmar.

ucstring_v1.tgz (45,608 bytes) - source code


UCSTRING: Unicode in Eiffel (Version 1: 1999.10.11)

1. What is UCSTRING?

This library implements a string which is a sequence of 16bit characters. Most of currently available Eiffel-compilers only have 8bit-characters. There is some noise about implementing 16bit-characters as in Java, but it will surely take some years to be within the standard libraries.

This library implements -- similar to the existing classes (CHARACTER, CHARACTER_REF, and STRING) -- unicode-orientet classes (UCCHAR, UCCHAR_REF und UCSTRING).

2. Platforms

UCSTRING was developed on base of ELKS 1995 and was tested under the following platforms:

3. Porting

UCSTRING was develloped with respect to maximal portability. I did use only classes which are in ELKS 1995. But ELKS 1995 lacks some essential routines. They are contained in BASIC_ROUTINES and MK_HASH_TABLE. If you plan to use it on other compilers than the ones listed above, you have to tailor them yourself.

4. Using the Library

It's no problem to use UCCHARs. To create them from the corresponding codes or from simple eiffel-characters you can do it by using make_from_integer or make_from-character. A new code can be assigned by using set_code. To compare two ucchars, you have to use is_equal.

UCSTRING is useable similar to STRING. A new UCSTRING can be generated from an ordinary STRING by using make_from_string.

Have a close look at »test/test.e«.

5. Contents

6. License

This Library is under the Eiffel Forum Freeware License, Version 1.

7. Restrictions

Currently not implemented:

8. Future extensions

This version is based upon ELKS 1995. Because UCSTRING is based upon STRING, but the specification of the latter one is in some points unclear, one of the next versions will be based upon ELKS 2000.

This versions lacks the implementation some converting functions, which will be done in a future version.

Some time ago, Unicode 3.0 was released. Future version will use the data which is stored there.

The initialization of the unicode-database within uc_ctype takes a lot of time. This may be avoided and will be done in a future version.

9. Credits

UCSTRING contains some Code (hash_code, to_integer) from SmallEiffel's lib_std library (Dominic Colnet and Suzanne Collin).

10. References

[ELKS1995]
The Eiffel Library Kernel Standard, Vintage 1995
[ELKS2000]
The Eiffel Library Kernel Standard, Vintage 2000 (Draft)
[UC-CDB]
Unicode 2.0 Character Database

majkel kretschmar, 1999.10.11


[ Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters]