~ubuntu-branches/ubuntu/gutsy/icu/gutsy

« back to all changes in this revision

Viewing changes to readme.html

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2005-05-21 22:44:31 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: package-import@ubuntu.com-20050521224431-r7rktfhnu1n4tf1g
Tags: 2.1-2.1
Rename icu-doc to icu21-doc. icu-doc is built by the icu28 package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
  <body lang="en-US">
31
31
    <h1>International Components for Unicode<br>
32
 
     ICU 2.0 ReadMe</h1>
 
32
     ICU 2.1 ReadMe</h1>
33
33
 
34
 
    <p>Version: 2002-Mar-01<br>
 
34
    <p>Version: 2002-Apr-15<br>
35
35
     Copyright &copy; 1997-2002 International Business Machines Corporation and
36
36
    others. All Rights Reserved.</p>
37
37
    <!-- Remember that there is a copyright at the end too -->
51
51
      <li><a href="#SourceCode">ICU Source Code Organization</a></li>
52
52
 
53
53
      <li>
54
 
        <a href="#HowToBuild">How to Build And Install ICU</a>
 
54
        <a href="#HowToBuild">How to Build And Install ICU</a> 
55
55
 
56
56
        <ul class="TOC">
57
57
          <li><a href="#HowToBuildSupported">Supported Platforms</a></li>
67
67
      </li>
68
68
 
69
69
      <li>
70
 
        <a href="#ImportantNotes">Important Notes About Using ICU</a>
 
70
        <a href="#ImportantNotes">Important Notes About Using ICU</a> 
71
71
 
72
72
        <ul class="TOC">
73
73
          <li><a href="#ImportantNotesWindows">Windows Platform</a></li>
100
100
 
101
101
      <li>Character set conversions, with support for over 200 codepages</li>
102
102
 
103
 
      <li>Locale data for more than 160 locales</li>
 
103
      <li>Locale data for more than 220 locales</li>
104
104
 
105
105
      <li>Text collation (sorting) based on the Unicode Collation Algorithm
106
106
      (=ISO 14651), customizable and tailored for national standards</li>
187
187
      </tr>
188
188
 
189
189
      <tr>
190
 
        <td>Contacts &amp; Bug Reports/Feature Requests</td>
 
190
        <td>Contacts and Bug Reports/Feature Requests</td>
191
191
 
192
192
        <td><a href=
193
193
        "http://oss.software.ibm.com/icu/archives/">http://oss.software.ibm.com/icu/archives/</a></td>
202
202
    <p>The following list concentrates on changes that affect existing
203
203
    applications migrating from previous ICU releases. For more news about this
204
204
    release, see the <a href=
205
 
    "http://oss.software.ibm.com/icu/download/2.0/">ICU 2.0 download
 
205
    "http://oss.software.ibm.com/icu/download/2.1/">ICU 2.1 download
206
206
    page</a>.</p>
207
207
 
208
208
    <h3>Support for Unicode 3.1.1</h3>
218
218
    pairs). Especially, normalization is revamped for support of supplementary
219
219
    characters and higher performance.</p>
220
220
 
221
 
    <h3>Euro transition</h3>
222
 
 
223
 
    <p>Locale data for countries that are switching their national currencies
224
 
    to the Euro is updated to use the Euro symbol and appropriate currency
225
 
    formatting. The old data is available in _PREEURO locale variants. The
226
 
    _EURO variant selector can still be used to unambiguously get Euro currency
227
 
    symbol formatting. For some time around the transition, software should
228
 
    explicitly specify _PREEURO and _EURO variants to make sure to get the
229
 
    intended currency format.</p>
230
 
 
231
 
    <p>For more on this topic see the <a href=
232
 
    "http://www.ibm.com/developerworks/unicode/library/u-euro/">developerWorks
233
 
    article "Are you really ready for the Euro?"</a>.</p>
234
 
 
235
 
    <h3>API changes</h3>
236
 
 
237
 
    <p>Functions that take C-style string input arguments with const UChar *src
238
 
    and int32_t srcLength now consistently treat srcLength==-1 to mean that the
239
 
    input string is NUL-terminated and get srcLength=u_strlen(src).</p>
240
 
 
241
 
    <p>Functions that take C-style string output arguments with UChar *dest and
242
 
    int32_t destCapacity now handle NUL-termination of the output string
243
 
    consistently. If the output length is equal to destCapacity, then dest is
244
 
    filled with the output string and a warning code is set. For details about
245
 
    string handling see the <a href=
246
 
    "http://oss.software.ibm.com/icu/userguide/strings.html">User's Guide
247
 
    Strings chapter</a>.</p>
248
 
 
249
 
    <p>Some APIs have been <i>deprecated</i> for a long time (more than a year)
250
 
    and have been removed now.<br>
251
 
     Some other APIs have been marked as <i>deprecated</i> because they are
252
 
    replaced by improved APIs; the newly deprecated APIs will be available for
253
 
    another year. In particular, the C++ classes UnicodeConverter, Unicode, and
254
 
    BiDi are deprecated in favor of the equally powerful C APIs.<br>
255
 
     A few <i>draft</i> APIs have changed, especially for transliteration.</p>
256
 
 
257
 
    <p>APIs that take a rules or pattern string (for collation,
258
 
    transliteration, message formats, etc.) now also take a
259
 
    <code>UParseError</code> structure that is filled with useful debugging
260
 
    information when a rule syntax error is detected. This makes it easier in
261
 
    large rules to find problems. As a result, the signatures of some functions
262
 
    have changed. The old signatures will be available for about a year by
263
 
    #defining a constant. See affected header files for details.</p>
264
 
 
265
 
    <p>The C++ Normalizer class had a partially broken model for iterative
266
 
    normalization; this is redone in a more consistent way. See the <a href=
267
 
    "http://oss.software.ibm.com/icu/apiref/class_Normalizer.html">Normalizer
268
 
    API documentation</a> for details.</p>
 
221
    <p>ICU 2.1 also includes <a href=
 
222
    "http://www.unicode.org/versions/corrigendum3.html">Corrigendum #3: U+F951
 
223
    Normalization</a>.</p>
269
224
 
270
225
    <h3>Memory and resource cleanup</h3>
271
226
 
282
237
    The ICU libraries can then even be unloaded cleanly without shutting down
283
238
    the process.</p>
284
239
 
285
 
    <h3>ICU versioning - C++ namespaces</h3>
286
 
 
287
 
    <p>Beginning with ICU 2.0, multiple releases of ICU can be used in the same
288
 
    process. Together with an arbitrary number of post-2.0 releases, one
289
 
    pre-2.0 release can be loaded and active.</p>
290
 
 
291
 
    <p>This is achieved by renaming all library exports to include a release
292
 
    number suffix. Each global function and each class is renamed in this way
293
 
    using a header file with #defines. For C++, if the compiler supports
294
 
    namespaces, all ICU C++ classes are defined in the "icu" namespace. If the
295
 
    compiler does not support namespaces, then the classes are renamed instead.
296
 
    This change also reduces the chance of naming collisions with other
297
 
    libraries.</p>
298
 
 
299
 
    <p>For details see the <a href=
300
 
    "http://oss.software.ibm.com/icu/userguide/design.html">User's Guide Design
301
 
    Chapter</a>.</p>
302
 
 
303
240
    <h3>Data loading changed</h3>
304
241
 
305
242
    <p>ICU data loading is simplified for most users. By default, the ICU build
323
260
    "http://oss.software.ibm.com/icu/userguide/icudata.html">User's Guide ICU
324
261
    Data Chapter</a>.</p>
325
262
 
326
 
    <h3>Collation improvements</h3>
327
 
 
328
 
    <p>The performance of Japanese Katakana collation is improved, and the
329
 
    Japanese collation is changed for conformance with the JIS X 4061 standard.
330
 
    The improvement is in the handling of the length and iteration marks,
331
 
    making the processing of regular letters faster.</p>
332
 
 
333
 
    <p>The JIS X 4061 standard specifies a 5-level sorting algorithm. Sorting
334
 
    with all five levels according to JIS is achieved in ICU 2.0 with the
335
 
    "identical" strength. The fifth level distinguishes regular character codes
336
 
    from compatibility variants.</p>
337
 
 
338
 
    <p>There is special code to handle the fourth (quarternary) level of the
339
 
    JIS standard, which distinguishes between Hiragana and Katakana letters. In
340
 
    ICU 2.0 string comparisons (like ucol_strcoll), when using the "shifted"
341
 
    option, this is slow because it generates complete sort keys for both
342
 
    strings. This is not an issue if the "shifted" option is not used, or if
343
 
    the string comparison is done with fewer levels.</p>
344
 
 
345
 
    <p>Quarternary strength, without the "shifted" option, is the default for
346
 
    Japanese collation in ICU 2.0.</p>
347
 
 
348
 
    <p>Three-level sorting (tertiary strength) and lower &mdash; if sufficient
349
 
    &mdash; is faster even with "shifted" on (for string comparisons:
350
 
    <em>much</em> faster in this case).</p>
351
 
 
352
 
    <h3>License Change (for ICU 1.8.1 and up)</h3>
353
 
 
354
 
    <p>The ICU projects (ICU4C and ICU4J) have changed their licenses from the
355
 
    IPL (IBM Public License) to the X license. The X license is a non-viral and
356
 
    recommended free software license that is compatible with the GNU GPL
357
 
    license. This is effective starting with release 1.8.1 of ICU4C and release
358
 
    1.3.1 of ICU4J. All previous ICU releases will continue to utilize the IPL.
359
 
    New ICU releases will adopt the X license. The users of previous releases
360
 
    of ICU will need to accept the terms and conditions of the X license in
361
 
    order to adopt the new ICU releases.</p>
362
 
 
363
 
    <p>The main effect of the change is to provide GPL compatibility. The X
364
 
    license is listed as GPL compatible, see the gnu page at <a href=
365
 
    "http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses</a>.</p>
366
 
 
367
 
    <p>The text of the X license is available at <a href=
368
 
    "http://www.x.org/terms.htm">http://www.x.org/terms.htm</a>. The IBM
369
 
    version contains the essential text of the license, omitting the X-specific
370
 
    trademarks and copyright notices.</p>
371
 
 
372
 
    <p>For more details please see the <a href=
373
 
    "http://oss.software.ibm.com/icu/press.html">press announcement</a> and the
374
 
    <a href="http://oss.software.ibm.com/icu/project_faq.html#license">Project
375
 
    FAQ</a>.</p>
376
 
 
377
 
    <h3>Transliterator improvements</h3>
378
 
 
379
 
    <p>The transliterator service has undergone an extensive overhaul, in both
380
 
    the rule-based engine and the built-in system rules. For a complete
381
 
    description see the <a href=
382
 
    "http://oss.software.ibm.com/icu/userguide/Transliteration.html">User's
383
 
    Guide chapter on transliteration</a>.</p>
384
 
 
385
 
    <ul>
386
 
      <li><b>New or rewritten rules:</b> <tt>Any-Accents</tt>,
387
 
      <tt>Any-Publishing</tt>, <tt>Cyrillic-Latin</tt>*, <tt>Greek-Latin</tt>*,
388
 
      <tt>Greek-Latin/UNGEGN</tt> (aka <tt>el-Latin</tt>),
389
 
      <tt>Hiragana-Latin</tt>*, and <tt>Latin-Katakana</tt>*. New algorithmic
390
 
      rules include <tt>Any-Name</tt>*, the normalization rules
391
 
      <tt>Any-NFC</tt>, <tt>Any-NFKC</tt>, <tt>Any-NFD</tt>, and
392
 
      <tt>Any-NFKD</tt>, casing rules <tt>Any-Upper</tt>, <tt>Any-Lower</tt>,
393
 
      and <tt>Any-Title</tt>. <tt>Unicode-Hex</tt>* has been renamed
394
 
      <tt>Any-Hex</tt>*. <tt>Any-Remove</tt> deletes its input. [*<em>applies
395
 
      to reverse rule as well</em>]</li>
396
 
 
397
 
      <li><b>Indic script rules:</b> Transliterators between Indic scripts and
398
 
      from each script to and from Latin have been completely revised. Scripts
399
 
      included are Bengali, Devanagari, Gujarati, Gurmukhi, Kannada, Malayalam,
400
 
      Oriya, Tamil, and Telugu. Taking Bengali as an example, transliterators
401
 
      <tt>Bengali-X</tt> and <tt>X-Bengali</tt> exist, where X is any of the
402
 
      other listed Indic scripts, or Latin.</li>
403
 
 
404
 
      <li><b>Deleted rules:</b> <tt>UnicodeName-UnicodeChar</tt> has been
405
 
      replaced by <tt>Any-Name</tt>*. <tt>Latin-Arabic</tt>* and
406
 
      <tt>Latin-Hebrew</tt>* have been removed until they can be rewritten.
407
 
      <tt>KeyboardEscape-Latin1</tt> has been replaced by <tt>Any-Accents</tt>
408
 
      and <tt>Any-Publishing</tt>. <tt>Latin-Kana</tt>* has been replaced by
409
 
      <tt>Latin-Katakana</tt>* and <tt>Latin-Hiragana</tt>*. [*<em>applies to
410
 
      reverse rule as well</em>]</li>
411
 
 
412
 
      <li><b>ID syntax changes:</b> Transliterator IDs ignore case and
413
 
      whitespace now. They now have the standard form
414
 
      <em>[filter]source-target/variant</em>. The "<em>[filter]</em>" element
415
 
      is optional; if present, it limits the characters that the transliterator
416
 
      operates on. The "<em>source-</em>" element is optional; if omitted, it
417
 
      is taken to be <tt>Any</tt>. The "<em>/variant</em>" element is also
418
 
      optional; if present, it selects between different flavors of a related
419
 
      set of transliterators, for example, <tt>Greek-Latin</tt> and
420
 
      <tt>Greek-Latin/UNGEGN</tt>. The source, target, and variant specifiers
421
 
      are case-insensitive strings of the form
422
 
      <tt>/[_[:L:]][_[:L:][:N:]]*/</tt>.</li>
423
 
 
424
 
      <li>
425
 
        <b>Locale support:</b> The source, target, or both may be locales. In
426
 
        this case the transliterator rules will be looked up in the system
427
 
        locale resource bundles. Rules are sought under three tags, listed
428
 
        below. The text after the underscore in each tag is always
429
 
        canonicalized to uppercase before lookup. <em>Note: The underscore is
430
 
        currently omitted from ICU4C tags, but will be restored when
431
 
        possible.</em>
432
 
 
433
 
        <ul>
434
 
          <li><tt>TransliterateTo_<em>SCRIPT</em></tt>: Unidirectional rules
435
 
          from the enclosing locale to another script or specifier.</li>
436
 
 
437
 
          <li><tt>TransliterateFrom_<em>SCRIPT</em></tt>: Unidirectional rules
438
 
          from another script or specifier to the enclosing locale.</li>
439
 
 
440
 
          <li><tt>Transliterate_<em>SCRIPT</em></tt>: Bidirectional rules, with
441
 
          the forward direction being To and the reverse direction being
442
 
          From.</li>
443
 
        </ul>
444
 
        Lookup proceeds in the following order:
445
 
 
446
 
        <ul>
447
 
          <li>In the dynamic registry: <em>source-target</em></li>
448
 
 
449
 
          <li>In the <em>source</em> locale:
450
 
          <tt>TransliterateTo_<em>TARGET</em></tt> then
451
 
          <tt>Transliterate_<em>TARGET</em></tt> (forward direction)</li>
452
 
 
453
 
          <li>In the <em>target</em> locale:
454
 
          <tt>TransliterateFrom_<em>SOURCE</em></tt> then
455
 
          <tt>Transliterate_<em>SOURCE</em></tt> (reverse direction)</li>
456
 
        </ul>
457
 
        If either the source or target specifier is not a locale then the
458
 
        corresponding locale lookup is skipped. If either is a locale, then
459
 
        locale fallback from <tt>aa_BB_CCC</tt> to <tt>aa_BB</tt> to
460
 
        <tt>aa</tt> is performed (where <tt>aa</tt>, <tt>BB</tt>, and
461
 
        <tt>CCC</tt> are the locale language, country, and variant). The final
462
 
        fallback is from the specifier, whether it is a locale or not (e.g.,
463
 
        script abbreviation), to the long script name associated with that
464
 
        specifier. If a tag lookup succeeds, the attached element should be a
465
 
        string array of <i>2n</i> items where <i>n</i> &gt;= 1. Each pair of
466
 
        strings is a variant name and rule string. The variants are matched
467
 
        against the requested variant. If no variant is specified then the
468
 
        first variant is considered to match.
469
 
      </li>
470
 
 
471
 
      <li><b>Filters on compounds IDs:</b> A filter on a compound
472
 
      transliterator can now be specified by giving a leading entry that
473
 
      contains a filter and no transliterator ID. For example, "<tt>[abc];
474
 
      Latin-Katakana; Katakana-Hiragana</tt>" submits only the characters
475
 
      contained in the UnicodeSet <tt>[abc]</tt> to the compound transliterator
476
 
      <tt>Latin-Katakana; Katakana-Hiragana</tt>.</li>
477
 
 
478
 
      <li><b>Explicit reverse IDs:</b> Typically if a transliterator
479
 
      <tt>A-B</tt> is formed, and its inverse is requested, the system tries to
480
 
      create <tt>B-A</tt>. That is, the source and target are exchanged. In
481
 
      some cases, the user may wish a different transliterator to be considered
482
 
      the reverse. In order to do this, the reverse ID is specified in
483
 
      parentheses immediately following the ID. For example, "<tt>A-B
484
 
      (B-C)</tt>" is a transliterator <tt>A-B</tt> whose inverse is
485
 
      <tt>B-C</tt>. If the ID of the inverse is requested, "<tt>B-C (A-B)</tt>"
486
 
      is returned. The forward or reverse component may be empty, so
487
 
      "<tt>(B-C)</tt>" and "<tt>A-B()</tt>" are legal IDs with <tt>Null</tt>
488
 
      transliterator for the forward and reverse direction, respectively. This
489
 
      is most useful in compounds where one element has no inverse or where a
490
 
      different inverse from the standard inverse is desired. For example,
491
 
      "<tt>Any-Lower(); Latin-Cyrillic</tt>".</li>
492
 
 
493
 
      <li><b>Quantifiers:</b> Transliterator rules may now contain quantifiers
494
 
      '<tt>*</tt>', '<tt>+</tt>', and '<tt>?</tt>'. These indicate zero or
495
 
      more, one or more, and zero or one matches, respectively. Quantifiers
496
 
      apply to the last element, be it a single character, a UnicodeSet, a
497
 
      segment definition, or a quote; the entire preceding element is repeated.
498
 
      Quantifiers are implemented as greedy, non-backtracking matchers, unlike
499
 
      their typical implementation in regular expressions. As a result,
500
 
      expressions that match in a traditional regular expression engine (e.g.,
501
 
      Perl) will not match in transliterator. E.g., "[a-z]+ q &gt; x;" will
502
 
      <em>not</em> match "abcq", since the '<tt>+</tt>' quantifier consumes all
503
 
      four characters.</li>
504
 
 
505
 
      <li><b>Dot character:</b> A new special character is recognized in rules,
506
 
      '<tt>.</tt>' (U+0020). This character matches any characters in the set
507
 
      <tt>[^[:Zp:][:Zl:]\r\n$]</tt>. Note the trailing '<tt>$</tt>' in the set
508
 
      pattern, which indicates that the ETHER character is <em>not</em> matched
509
 
      by '<tt>.</tt>'.</li>
510
 
 
511
 
      <li><b>::ID blocks in rules:</b> Transliterator IDs may now be included
512
 
      in rule sets. These may occur in two locations: as one contiguous block
513
 
      before any other rules, and as one contiguous block after all rules. The
514
 
      effect of placing <tt>::ID</tt>s into a rule set is to enclose the
515
 
      rule-based transliterator within a compound transliterator containing the
516
 
      indicated IDs. The <tt>::ID</tt> syntax is exactly the same as the
517
 
      standard ID syntax, with the difference that each ID element is preceded
518
 
      by the special token "<tt>::</tt>".</li>
519
 
 
520
 
      <li><b>Segment definitions more flexible:</b> Segment definitions may be
521
 
      nested and are now unlimited in number. Prior to 2.0, segments could not
522
 
      be nested and were limited to nine ($1 to $9).</li>
523
 
 
524
 
      <li><b>Variable range pragma:</b> A new pragma is supported. This follows
525
 
      the syntax:<code>use variable range 0xE800 0xEFFF;</code> (Any two code
526
 
      points may be specified.) The code points are specified as decimal
527
 
      constants, octal constants with a leading '0', or hexadecimal constants
528
 
      with a leading "0x". The given range is used internally for stand-in
529
 
      characters during processing. The default range is <b>0xF000..0xF8FF</b>.
530
 
      If a rule set explicitly uses characters in the default variable range, a
531
 
      new range, not containing any characters in use in the rule set, must be
532
 
      specified. <em>Note:</em> This is the first of several planned
533
 
      pragmas.</li>
534
 
 
535
 
      <li><b>Factory method registration:</b> Factory methods (function
536
 
      pointers in ICU4C; functor objects in ICU4J) may be registered against
537
 
      transliterator IDs. This is generally more efficient than the
538
 
      registration of singleton prototypes, since no actual transliterator
539
 
      object need be created until the user requires one. See the
540
 
      <tt>registerFactory()</tt> method in <tt>Transliterator</tt>.</li>
541
 
 
542
 
      <li><b>Filtering semantics changed for subclasses:</b> Subclasses now
543
 
      need not concern themselves with filters. Instead, they may assume that
544
 
      all characters received by <tt>handleTransliterate()</tt> have already
545
 
      passed through the filter. This simplifies subclass code greatly.</li>
546
 
    </ul>
547
 
 
548
 
    <h3><a name="NewsUnicodeSet">UnicodeSet Improvements</a></h3>
549
 
 
550
 
    <ul>
551
 
      <li><b><tt>[:Any:]</tt> set:</b> The set <tt>[:Any:]</tt> matches all
552
 
      Unicode code points, that is, U+0000..U+10FFFF.</li>
553
 
 
554
 
      <li><b><tt>\p{}</tt> syntax:</b> UnicodeSet now recognizes a Perlish
555
 
      syntax for character properties. Any property designated as
556
 
      <tt>[:Foo:]</tt> may equivalently be designated <tt>\p{Foo}</tt>.</li>
557
 
 
558
 
      <li><b>Short, medium, and long property names:</b> In addition to the
559
 
      short property names, such as <tt>[:Ll:]</tt>, equivalent medium (e.g.,
560
 
      <tt>[:gc=Ll:]</tt>) and long (e.g.,
561
 
      <tt>[:GeneralCategory=LowercaseLetter:]</tt>) forms are recognized. See
562
 
      the <a href=
563
 
      "http://oss.software.ibm.com/cvs/icu/~checkout~/icuhtml/design/unicodeset_properties.html">
564
 
      UnicodeSet Properties design document</a> for details. As of this
565
 
      release, general categories, numeric value, and script are
566
 
      supported.</li>
567
 
    </ul>
 
263
    <h3>Library linking changed</h3>
 
264
 
 
265
    <ul>
 
266
      <li>
 
267
        <b>Linkage improvement for HP/UX</b> 
 
268
 
 
269
        <ul>
 
270
          <li>The current directory (.) is now searched for libraries.</li>
 
271
 
 
272
          <li>Where available, $ORIGIN is set in the embedded path so that if
 
273
          one ICU library is found, the system will be able to locate the
 
274
          others.</li>
 
275
        </ul>
 
276
      </li>
 
277
 
 
278
      <li>
 
279
        <b>Library Versioning for AIX (xlC and VisualAge)</b> 
 
280
 
 
281
        <ul>
 
282
          <li>AIX does not have facilities to enable library versioning. With
 
283
          this patch, libraries will now be named for instance
 
284
          <tt>libicuuc<b>20.1.so</b></tt> , however symlinks will allow
 
285
          applications to still link using <tt>-licuuc</tt> (without the
 
286
          benefit of versioning). To benefit from versioning, on AIX link
 
287
          against the major and minor versions by using
 
288
          <tt>-licuuc20</tt>.</li>
 
289
        </ul>
 
290
      </li>
 
291
 
 
292
      <li>
 
293
        <b>Data Library Versioning for all platforms</b> 
 
294
 
 
295
        <ul>
 
296
          <li>The versioned name for the data library will be linked against by
 
297
          the ICU libraries, that is, libicudt20b.so instead of
 
298
          libicudata.so</li>
 
299
        </ul>
 
300
      </li>
 
301
    </ul>
 
302
 
 
303
    <h3>Multithreaded usage is safer</h3>
 
304
 
 
305
    <p>It was discovered that some parts of ICU were not initialized in a
 
306
    thread safe manner. This has been fixed.</p>
568
307
    <hr>
569
308
 
570
309
    <h2><a name="Download" href="#Download">How to Download the Source
585
324
      <strong>icu-nnnn.tgz</strong>, where nnnn is the version number. The .zip
586
325
      file is used for Windows platforms, while the .tgz file is preferred on
587
326
      most other platforms.<br>
588
 
       Please unzip this file. It will reconstruct the source directory,
589
 
      including anonymous CVS control directories (see below).</li>
 
327
       Please unzip this file. It will reconstruct the source directory, which
 
328
      includes anonymous CVS control directories (see below).</li>
590
329
 
591
330
      <li><strong>CVS Source Repository:</strong><br>
592
331
       If you are interested in developing features, patches, or bug fixes for
601
340
    Organization</a></h2>
602
341
 
603
342
    <p>In the descriptions below, <strong><i>&lt;ICU&gt;</i></strong> is the
604
 
    full path name of the icu directory - the top level directory from the
605
 
    distribution archives - in your file system.</p>
 
343
    full path name of the icu directory (the top level directory from the
 
344
    distribution archives) in your file system. You can also view the <a href=
 
345
    "http://oss.software.ibm.com/icu/userguide/design.html">User's Guide</a> to
 
346
    see which libraries you need for your software product. You need at least
 
347
    the data (<code>[lib]icudt</code>) and the common (<code>[lib]icuuc</code>)
 
348
    libraries in order to use ICU.</p>
606
349
 
607
350
    <table border="1" cellpadding="0" width="100%" summary="">
608
351
      <caption>
630
373
        The following directories contain source code and data files.
631
374
      </caption>
632
375
 
633
 
                <tr>
634
 
                        <td>
635
 
                                <i>&lt;ICU&gt;</i>/source/<b>common</b>/
636
 
                        </td>
637
 
 
638
 
                        <td>
639
 
                                The core Unicode and support functionality, such as resource bundles,
640
 
                                character properties, locales, codepage conversion, normalization, Unicode
641
 
                                properties, Locale, and UnicodeString.
642
 
                        </td>
643
 
                </tr>
644
 
 
645
 
                <tr>
646
 
                        <td>
647
 
                                <i>&lt;ICU&gt;</i>/source/<b>i18n</b>/
648
 
                        </td>
649
 
 
650
 
                        <td>
651
 
                                Modules in i18n are generally the more data-driven, that is to say
652
 
                                resource bundle driven, components. These deal with higher level internationalization
653
 
                                issues such as formatting, collation, text break analysis, and transliteration.
654
 
                        </td>
655
 
                </tr>
656
 
 
657
 
                <tr>
658
 
                        <td>
659
 
                                <i>&lt;ICU&gt;</i>/source/<b>data</b>
660
 
                        </td>
661
 
 
662
 
                        <td>This directory contains the source data in text format which is compiled
663
 
                                into binary form during the ICU build process. It contains several subdirectories,
664
 
                                in which the data files are grouped by function. Note that the build process
665
 
                                must be run again after any changes are made to this directory.
666
 
                                <ul>
667
 
                                        <li>
668
 
                                                <b>brkitr/</b>&nbsp;<b> </b>Data files for character, word, sentence,
669
 
                                                title casing and line boundary analysis.
670
 
                                        </li>
671
 
 
672
 
                                        <li>
673
 
                                                <b>locales/</b>&nbsp; These .txt files contain ICU language and culture-specific
674
 
                                                localization data. Two special bundles are <b>root</b>, which is the fallback
675
 
                                                data and parent of other bundles, and <b>index</b> which contains a list
676
 
                                                of installed bundles. The makefile <b>resfiles.mk</b> contains the list
677
 
                                                of resource bundle files.
678
 
                                        </li>
679
 
 
680
 
                                        <li>
681
 
                                                <b>mappings/</b>&nbsp;&nbsp; Here are the <b>code page converter tables,</b>
682
 
                                                .ucm files containing mappings to and from Unicode. These are compiled
683
 
                                                into .cnv files. <b>convrtrs.txt</b> is the alias mapping table from various
684
 
                                                converter name formats to ICU internal format and vice versa. It produces
685
 
                                                cnvalias.dat. The makefiles which contain the list of converters to be
686
 
                                                built are <b>ucmfiles.mk, ucmcore.mk, </b>and <b>ucmebcdic.mk.</b>
687
 
                                        </li>
688
 
 
689
 
                                        <li>
690
 
                                                <b>translit/&nbsp;</b>&nbsp; This directory contains Transliterator rules
691
 
                                                as resource bundles, a makefile <b>trnsfiles.mk</b> containing the list
692
 
                                                of installed system translitaration files, and as well the special bundle
693
 
                                                <b>translit_index</b>
694
 
                                                which lists the system transliterator aliases.
695
 
                                        </li>
696
 
 
697
 
                                        <li>
698
 
                                                <b>unidata/</b> This directory contains the Unicode data files. Please
699
 
                                                see <a href="http://www.unicode.org/">http://www.unicode.org/</a> for more
700
 
                                                information.
701
 
                                        </li>
702
 
 
703
 
                                        <li>
704
 
                                                <b>misc/</b>&nbsp; The misc directory contains other data files which did
705
 
                                                not fit into the above categories. Currently it only contains <b>timezone.txt,</b>
706
 
                                                a generated file which is compiled into tz.dat, and containing time zone
707
 
                                                information.
708
 
                                        </li>
709
 
 
710
 
                                        <li>
711
 
                                                <b>out/ </b>This directory contains the assembled memory mapped files.
712
 
                                        </li>
713
 
 
714
 
                                        <li>
715
 
                                                <b>out/build </b>This directory contains intermediate (compiled) files,
716
 
                                                such as .cnv, .res, etc.
717
 
                                        </li>
718
 
                                </ul>
719
 
                        </td>
720
 
                </tr>
721
 
 
722
 
                <tr>
723
 
                        <td>
724
 
                                <i>&lt;ICU></i>/source/test/<b>intltest</b>/
725
 
                        </td>
726
 
 
727
 
                        <td>
728
 
                                A test suite including all C++ APIs. For information about running
729
 
                                the test suite, see the users' guide.
730
 
                        </td>
731
 
                </tr>
732
 
 
733
 
                <tr>
734
 
                        <td>
735
 
                                <i>&lt;ICU></i>/source/test/<b>cintltst</b>/
736
 
                        </td>
737
 
 
738
 
                        <td>
739
 
                                A test suite written in C, including all C APIs. For information about
740
 
                                running the test suite, see the users' guide.
741
 
                        </td>
742
 
                </tr>
743
 
 
744
 
                <tr>
745
 
                        <td>
746
 
                                <i>&lt;ICU></i>/source/test/<b>testdata</b>
747
 
                        </td>
748
 
 
749
 
                        <td>
750
 
                                Source text files for data which is read by the tests. It contains
751
 
                                the subdirectories <b>out/build/</b> which is used for intermediate files,
752
 
                                and <b>out/ </b>which contains the files <b>test1.cnv</b> through <b>test4.cnv,</b>
753
 
                                and <b>testdata.dat.</b>&nbsp; Note that the tests call u_setDataDirectory("&lt;ICU>/source/test/testdata/lib"),
754
 
                                so that ICU will load these files as if they were part of the ICU data
755
 
                                package, for testing purposes. This was formerly accomplished by setting
756
 
                                the ICU_DATA environment variable to point at these files. ICU_DATA should
757
 
                                not be set under normal circumstances.
758
 
                        </td>
759
 
                </tr>
760
 
 
761
 
                <tr>
762
 
                        <td>
763
 
                                <i>&lt;ICU&gt;</i>/source/<b>tools</b>
764
 
                        </td>
765
 
 
766
 
                        <td>
767
 
                                Tools for generating the data files. Data files are generated by invoking
768
 
                                <i>&lt;ICU></i>/source/data/build/makedata.bat
769
 
                                on Win32 or <i>&lt;ICU></i>/source/make on Unix.
770
 
                        </td>
771
 
                </tr>
772
 
 
773
 
                <tr>
774
 
                        <td>
775
 
                                <i>&lt;ICU></i>/source/<b>samples</b>
776
 
                        </td>
777
 
 
778
 
                        <td>
779
 
                                Various sample programs that use ICU
780
 
                        </td>
781
 
                </tr>
782
 
                <tr>
783
 
                        <td>
784
 
                                <i>&lt;ICU></i>/source/<b>extra</b>
785
 
                        </td>
786
 
 
787
 
                        <td>
788
 
                                Non-supported API additions. Currently, it contains the 'ustdio' file
789
 
                                i/o library
790
 
                        </td>
791
 
                </tr>
792
 
 
793
 
                <tr>
794
 
                        <td>
795
 
                                <i>&lt;ICU></i>/source/<b>layout</b>
796
 
                        </td>
797
 
 
798
 
                        <td>
799
 
                                Contains the ICU layout engine (not a rasterizer).
800
 
                        </td>
801
 
                </tr>
802
 
 
803
 
                <tr>
804
 
                        <td>
805
 
                                <i>&lt;ICU></i>/<b>packaging</b>
806
 
                                <br><i>&lt;ICU></i>/<b>debian</b>
807
 
                        </td>
808
 
 
809
 
                        <td>
810
 
                                These directories contain scripts and tools for packaging the final
811
 
                                ICU build for various release platforms.
812
 
                        </td>
813
 
                </tr>
814
 
 
815
 
                <tr>
816
 
                        <td>
817
 
                                <i>&lt;ICU></i>/source/<b>config</b>
818
 
                        </td>
819
 
 
820
 
                        <td>
821
 
                                Contains helper makefiles for platform specific build commands. Used
822
 
                                by 'configure'.
823
 
                        </td>
824
 
                </tr>
825
 
 
826
 
                <tr>
827
 
                        <td>
828
 
                                <i>&lt;ICU></i>/source/<b>allinone</b>
829
 
                        </td>
830
 
 
831
 
                        <td>
832
 
                                Contains top-level ICU project files, for instance to build all of
833
 
                                ICU under one MSVC project.
834
 
                        </td>
835
 
                </tr>
 
376
      <tr>
 
377
        <td><i>&lt;ICU&gt;</i>/source/<b>common</b>/</td>
 
378
 
 
379
        <td>The core Unicode and support functionality, such as resource
 
380
        bundles, character properties, locales, codepage conversion,
 
381
        normalization, Unicode properties, Locale, and UnicodeString.</td>
 
382
      </tr>
 
383
 
 
384
      <tr>
 
385
        <td><i>&lt;ICU&gt;</i>/source/<b>i18n</b>/</td>
 
386
 
 
387
        <td>Modules in i18n are generally the more data-driven, that is to say
 
388
        resource bundle driven, components. These deal with higher-level
 
389
        internationalization issues such as formatting, collation, text break
 
390
        analysis, and transliteration.</td>
 
391
      </tr>
 
392
 
 
393
      <tr>
 
394
        <td><i>&lt;ICU&gt;</i>/source/<b>data</b> </td>
 
395
 
 
396
        <td>
 
397
          This directory contains the source data in text format, which is
 
398
          compiled into binary form during the ICU build process. It contains
 
399
          several subdirectories, in which the data files are grouped by
 
400
          function. Note that the build process must be run again after any
 
401
          changes are made to this directory. 
 
402
 
 
403
          <ul>
 
404
            <li><b>brkitr/</b> Data files for character, word, sentence, title
 
405
            casing and line boundary analysis.</li>
 
406
 
 
407
            <li><b>locales/</b> These .txt files contain ICU language and
 
408
            culture-specific localization data. Two special bundles are
 
409
            <b>root</b>, which is the fallback data and parent of other
 
410
            bundles, and <b>index</b>, which contains a list of installed
 
411
            bundles. The makefile <b>resfiles.mk</b> contains the list of
 
412
            resource bundle files.</li>
 
413
 
 
414
            <li><b>mappings/</b> Here are the <b>code page converter
 
415
            tables,</b> .ucm files containing mappings to and from Unicode.
 
416
            These are compiled into .cnv files. <b>convrtrs.txt</b> is the
 
417
            alias mapping table from various converter name formats to ICU
 
418
            internal format and vice versa. It produces cnvalias.dat. The
 
419
            makefiles <b>ucmfiles.mk, ucmcore.mk,</b> and <b>ucmebcdic.mk</b>
 
420
            contain the list of converters to be built.</li>
 
421
 
 
422
            <li><b>translit/</b> This directory contains transliterator rules
 
423
            as resource bundles, a makefile <b>trnsfiles.mk</b> containing the
 
424
            list of installed system translitaration files, and as well the
 
425
            special bundle <b>translit_index</b> which lists the system
 
426
            transliterator aliases.</li>
 
427
 
 
428
            <li><b>unidata/</b> This directory contains the Unicode data files.
 
429
            Please see <a href=
 
430
            "http://www.unicode.org/">http://www.unicode.org/</a> for more
 
431
            information.</li>
 
432
 
 
433
            <li><b>misc/</b> The misc directory contains other data files which
 
434
            did not fit into the above categories. Currently it only contains
 
435
            <b>timezone.txt,</b> a generated file, which is compiled into
 
436
            tz.dat. The <b>tz.dat</b> file contains time zone information.</li>
 
437
 
 
438
            <li><b>out/</b> This directory contains the assembled memory mapped
 
439
            files.</li>
 
440
 
 
441
            <li><b>out/build</b> This directory contains intermediate
 
442
            (compiled) files, such as .cnv, .res, etc.</li>
 
443
          </ul>
 
444
        </td>
 
445
      </tr>
 
446
 
 
447
      <tr>
 
448
        <td><i>&lt;ICU&gt;</i>/source/test/<b>intltest</b>/</td>
 
449
 
 
450
        <td>A test suite including all C++ APIs. For information about running
 
451
        the test suite, see the users' guide.</td>
 
452
      </tr>
 
453
 
 
454
      <tr>
 
455
        <td><i>&lt;ICU&gt;</i>/source/test/<b>cintltst</b>/</td>
 
456
 
 
457
        <td>A test suite written in C, including all C APIs. For information
 
458
        about running the test suite, see the users' guide.</td>
 
459
      </tr>
 
460
 
 
461
      <tr>
 
462
        <td><i>&lt;ICU&gt;</i>/source/test/<b>testdata</b>/</td>
 
463
 
 
464
        <td>Source text files for data, which are read by the tests. It
 
465
        contains the subdirectories <b>out/build/</b> which is used for
 
466
        intermediate files, and <b>out/</b> which contains the files
 
467
        <b>test1.cnv</b> through <b>test4.cnv,</b> and <b>testdata.dat.</b>
 
468
        Note that the tests call
 
469
        u_setDataDirectory("&lt;ICU&gt;/source/test/testdata/lib"), so that ICU
 
470
        will load these files as if they were part of the ICU data package, for
 
471
        testing purposes. This was formerly accomplished by setting the
 
472
        ICU_DATA environment variable to point at these files. ICU_DATA should
 
473
        not be set under normal circumstances.</td>
 
474
      </tr>
 
475
 
 
476
      <tr>
 
477
        <td><i>&lt;ICU&gt;</i>/source/<b>tools</b> </td>
 
478
 
 
479
        <td>Tools for generating the data files. Data files are generated by
 
480
        invoking <i>&lt;ICU&gt;</i>/source/data/build/makedata.bat on Win32 or
 
481
        <i>&lt;ICU&gt;</i>/source/make on Unix.</td>
 
482
      </tr>
 
483
 
 
484
      <tr>
 
485
        <td><i>&lt;ICU&gt;</i>/source/<b>samples</b> </td>
 
486
 
 
487
        <td>Various sample programs that use ICU</td>
 
488
      </tr>
 
489
 
 
490
      <tr>
 
491
        <td><i>&lt;ICU&gt;</i>/source/<b>extra</b> </td>
 
492
 
 
493
        <td>Non-supported API additions. Currently, it contains the 'ustdio'
 
494
        file i/o library</td>
 
495
      </tr>
 
496
 
 
497
      <tr>
 
498
        <td><i>&lt;ICU&gt;</i>/source/<b>layout</b>/</td>
 
499
 
 
500
        <td>Contains the ICU layout engine (not a rasterizer).</td>
 
501
      </tr>
 
502
 
 
503
      <tr>
 
504
        <td><i>&lt;ICU&gt;</i>/<b>packaging</b>/<br>
 
505
         <i>&lt;ICU&gt;</i>/<b>debian</b>/</td>
 
506
 
 
507
        <td>These directories contain scripts and tools for packaging the final
 
508
        ICU build for various release platforms.</td>
 
509
      </tr>
 
510
 
 
511
      <tr>
 
512
        <td><i>&lt;ICU&gt;</i>/source/<b>config</b>/</td>
 
513
 
 
514
        <td>Contains helper makefiles for platform specific build commands.
 
515
        Used by 'configure'.</td>
 
516
      </tr>
 
517
 
 
518
      <tr>
 
519
        <td><i>&lt;ICU&gt;</i>/source/<b>allinone</b>/</td>
 
520
 
 
521
        <td>Contains top-level ICU workspace and project files, for instance to
 
522
        build all of ICU under one MSVC project.</td>
 
523
      </tr>
 
524
 
 
525
      <tr>
 
526
        <td><i>&lt;ICU&gt;</i>/<b>bin</b>/</td>
 
527
 
 
528
        <td>Contains the libraries and executables for using ICU on
 
529
        Windows.</td>
 
530
      </tr>
 
531
 
 
532
      <tr>
 
533
        <td><i>&lt;ICU&gt;</i>/<b>include</b>/</td>
 
534
 
 
535
        <td>Contains the headers needed for developing software that uses ICU
 
536
        on Windows.</td>
 
537
      </tr>
836
538
    </table>
837
539
    <!-- end of ICU structure ==================================== -->
838
540
 
865
567
      </tr>
866
568
 
867
569
      <tr>
868
 
        <td>Red Hat Linux 6.1</td>
869
 
 
870
 
        <td>gcc 2.95.2</td>
871
 
 
872
 
        <td>Reference platform</td>
873
 
      </tr>
874
 
 
875
 
      <tr>
876
 
        <td>AIX 4.3.3</td>
877
 
 
878
 
        <td>xlC 3.6.4</td>
879
 
 
880
 
        <td>Reference platform</td>
881
 
      </tr>
882
 
 
883
 
      <tr>
884
 
        <td>Solaris 2.6</td>
885
 
 
886
 
        <td>Workshop Pro CC 4.2</td>
887
 
 
888
 
        <td>Reference platform</td>
889
 
      </tr>
890
 
 
891
 
      <tr>
892
 
        <td>HP/UX 11.01</td>
893
 
 
894
 
        <td>aCC A.12.10</td>
 
570
        <td>Red Hat Linux 7.1</td>
 
571
 
 
572
        <td>gcc 2.96</td>
895
573
 
896
574
        <td>Reference platform</td>
897
575
      </tr>
901
579
 
902
580
        <td>Visual Age C++ 5.0</td>
903
581
 
904
 
        <td>Regularly tested</td>
 
582
        <td>Reference platform</td>
905
583
      </tr>
906
584
 
907
585
      <tr>
909
587
 
910
588
        <td>Workshop Pro CC 6.0</td>
911
589
 
 
590
        <td>Reference platform</td>
 
591
      </tr>
 
592
 
 
593
      <tr>
 
594
        <td>HP/UX 11.01</td>
 
595
 
 
596
        <td>aCC A.12.10</td>
 
597
 
 
598
        <td>Reference platform</td>
 
599
      </tr>
 
600
 
 
601
      <tr>
 
602
        <td>Windows XP</td>
 
603
 
 
604
        <td>Microsoft Visual C++ 6.0</td>
 
605
 
 
606
        <td>Regularly tested</td>
 
607
      </tr>
 
608
 
 
609
      <tr>
 
610
        <td>AIX 4.3.3</td>
 
611
 
 
612
        <td>xlC 3.6.6</td>
 
613
 
 
614
        <td>Regularly tested</td>
 
615
      </tr>
 
616
 
 
617
      <tr>
 
618
        <td>Solaris 2.6</td>
 
619
 
 
620
        <td>Workshop Pro CC 4.2</td>
 
621
 
912
622
        <td>Regularly tested</td>
913
623
      </tr>
914
624
 
937
647
      </tr>
938
648
 
939
649
      <tr>
 
650
        <td>Mac OS X (10.1)</td>
 
651
 
 
652
        <td>gcc-932.1, based on gcc version 2.95.2<br>
 
653
        (Developer Tools December 2001)</td>
 
654
 
 
655
        <td>Regularly tested</td>
 
656
      </tr>
 
657
 
 
658
      <tr>
940
659
        <td>OS/390 (zSeries)</td>
941
660
 
942
661
        <td>CC r10</td>
969
688
      </tr>
970
689
 
971
690
      <tr>
972
 
        <td>PTX</td>
973
 
 
974
 
        <td>&nbsp;</td>
975
 
 
976
 
        <td>Rarely tested</td>
977
 
      </tr>
978
 
 
979
 
      <tr>
980
 
        <td>OS/2</td>
981
 
 
982
 
        <td>Visual Age</td>
983
 
 
984
 
        <td>Rarely tested</td>
985
 
      </tr>
986
 
 
987
 
      <tr>
988
 
        <td>Macintosh</td>
989
 
 
990
 
        <td>&nbsp;</td>
991
 
 
992
 
        <td>Needs help to port</td>
 
691
        <td>Tru64 (OSF)</td>
 
692
 
 
693
        <td>Compaq's cxx compiler</td>
 
694
 
 
695
        <td>Rarely tested</td>
993
696
      </tr>
994
697
    </table>
995
698
 
1025
728
      release build of max speed optimization).</li>
1026
729
    </ul>
1027
730
 
 
731
    <p>(If you want to build with Microsoft Visual C++ .NET, please refer to
 
732
    the <a href="#HowToBuildWindowsDotNet">note about building with Visual
 
733
    Studio .NET</a> below.)</p>
 
734
 
1028
735
    <p>The steps are:</p>
1029
736
 
1030
737
    <ol>
1037
744
      will not work without the location of the ICU dll files in the path.</li>
1038
745
 
1039
746
      <li>Set the <strong>TZ</strong> environment variable to
1040
 
      <strong>PST8PDT</strong>. The tests will not work in any other
1041
 
      timezone.</li>
 
747
      <strong>PST8PDT</strong>. The tests will not work in any other time
 
748
      zone.</li>
1042
749
 
1043
750
      <li>Open the "<i>&lt;ICU&gt;</i>\source\allinone\allinone.dsw" workspace
1044
751
      file in Microsoft Visual C++ 6.0. (This workspace includes all the
1074
781
      <li>Reset the <strong>TZ</strong> environment variable to its original
1075
782
      value, unless you plan on testing ICU any further.</li>
1076
783
 
1077
 
      <li>You are now able to develop applications with ICU.</li>
 
784
      <li>You are now able to develop applications with ICU by using the
 
785
      libraries and tools in <i>&lt;ICU&gt;</i>\bin\. The headers are in
 
786
      <i>&lt;ICU&gt;</i>\include\ and the link libraries are in
 
787
      <i>&lt;ICU&gt;</i>\lib\. To install the ICU runtime on a machine,
 
788
      or ship it with your application, copy the needed components from
 
789
      <i>&lt;ICU&gt;</i>\bin\</li> to a location on the system PATH or to
 
790
      your application directory.
1078
791
    </ol>
1079
792
 
1080
793
    <p><a name="HowToBuildWindowsCommandLine"><strong>Using MSDEV At The
1105
818
    Note:</strong></a> If you want to build the Debug and Release
1106
819
    configurations at the same time, choose "Build" menu and select "Batch
1107
820
    Build..." instead (and mark all configurations as checked), then click the
1108
 
    button named "Rebuild All". The "all" workspace will build all the test
1109
 
    programs as well as the tools for generating binary locale data files. The
1110
 
    "makedata" project will be run automatically to convert the locale data
1111
 
    files from text format into icudata.dll.</p>
 
821
    button named "Rebuild All". The "all" workspace will build all the
 
822
    libraries, test programs and various ICU tools (e.g. genrb for generating
 
823
    binary locale data files).</p>
 
824
 
 
825
    <p><a name="HowToBuildWindowsDotNet"><strong>Microsoft Visual Studio .NET
 
826
    Note:</strong></a> ICU will build with Microsoft Visual Studio .NET, though
 
827
    this is not a supported platform at the time of this writing. Visual Studio
 
828
    .NET will offer to convert the project files when you open the existing
 
829
    workspace file. Choose "Yes to All" in the dialog asking whether to convert
 
830
    the files or not (this creates new files) and then follow the rest of the
 
831
    build instructions.</p>
1112
832
 
1113
833
    <h3><a name="HowToBuildUnix" href="#HowToBuildUnix">How To Build And
1114
834
    Install On Unix</a></h3>
1115
835
 
1116
836
    <p>Building International Components for Unicode on Unix requires:</p>
1117
837
 
1118
 
    <p>A UNIX C++ compiler, (gcc, cc, xlc_r, etc...) installed on the target
 
838
    <p>A UNIX C++ compiler, (gcc, CC, xlC_r, etc...) installed on the target
1119
839
    machine. A recent version of GNU make (3.7+). For a list of OS/390 tools
1120
840
    please view the <a href="#HowToBuildOS390">OS/390 build section</a> of this
1121
841
    document for further details.</p>
1128
848
 
1129
849
      <li>Change directory to the "icu/source".</li>
1130
850
 
1131
 
      <li>chmod +x runConfigureICU install-sh</li>
 
851
      <li>Run "chmod +x runConfigureICU configure install-sh" as these files
 
852
      may have the wrong permissions.</li>
1132
853
 
1133
854
      <li>Run the <a href="source/runConfigureICU">runConfigureICU</a> script
1134
 
      for your platform. If you are not using the runConfigureICU script or
1135
 
      your platform is not supported by the script, you need to set your CC,
1136
 
      CXX, CFLAGS and CXXFLAGS environment variables, and type "./configure".
1137
 
      You can type "./configure --help" to print the available options.</li>
1138
 
 
1139
 
      <li>Type "gmake" to compile the libraries and all the data files.</li>
1140
 
 
1141
 
      <li>
1142
 
        Optionally, type "gmake check" to verify the test suite.
1143
 
 
1144
 
        <ul>
1145
 
          <li>
1146
 
            <b>Note:</b> You may have to set certain variables if you with to
1147
 
            run test programs individually, that is apart from "make check".
1148
 
            The <strong>TZ</strong> environment variable needs to be set to
1149
 
            <strong>PST8PDT</strong>. Also, the environment variable
1150
 
            <strong>ICU_DATA</strong> must be set to the full pathname of the
1151
 
            data directory, to indicate where the locale data files and
1152
 
            conversion mapping tables are. The trailing "/" is required after
1153
 
            the directory name (e.g. "$Root/source/data/" will work, but the
1154
 
            value "$Root/source/data" is not acceptable).
1155
 
 
1156
 
            <p>When running samples or other applications, ICU_DATA only needs
1157
 
            to be set if the data is not installed (such as via 'make install')
1158
 
            into the default location.</p>
1159
 
          </li>
1160
 
        </ul>
1161
 
      </li>
1162
 
 
1163
 
      <li>Type "gmake install" to install.</li>
 
855
      for your platform. (See <a href="#HowToConfigureICU">note</a>
 
856
      below).</li>
 
857
 
 
858
      <li>Type "gmake" (or "make" if GNU make is the default make on your
 
859
      platform) to compile the libraries and all the data files. The proper
 
860
      name of the GNU make command is printed at the end of the configuration
 
861
      run, as in "You must use gmake to compile ICU".</li>
 
862
 
 
863
      <li>Optionally, type "gmake check" (or "make check") to run the test
 
864
      suite, which checks for ICU's functionality integrity (See <a href=
 
865
      "#HowToTestWithoutGmake">note</a> below).</li>
 
866
 
 
867
      <li>Type "gmake install" (or "make install") to install. The install
 
868
      targets support the use of the DESTDIR variable to create the
 
869
      installation tree under a specific destination directory. (See <a href=
 
870
      "#HowToInstallICU">note</a> below).</li>
1164
871
    </ol>
1165
872
 
 
873
    <p><a name="#HowToConfigureICU"><strong>Configuring ICU NOTE:</strong></a>
 
874
    Type "./runConfigureICU --help" for help on how to run it and a list of
 
875
    supported platforms. You may also want to type "./configure --help" to
 
876
    print the available configure options that you may want to give
 
877
    runConfigureICU. If you are not using the runConfigureICU script, or your
 
878
    platform is not supported by the script, you may need to set your CC,CXX,
 
879
    CFLAGS and CXXFLAGS environment variables, and type "./configure". Some of
 
880
    the more frequently used options to configure are --disable-64bit-libs to
 
881
    create 32-bit libraries, and --srcdir to do out of source builds (build the
 
882
    libraries in the current location).</p>
 
883
 
 
884
    <p><a name="#HowToTestWithoutGmake"><strong>Running The Tests From The
 
885
    Command Line NOTE:</strong></a> You may have to set certain variables if
 
886
    you with to run test programs individually, that is apart from "make
 
887
    check". The <strong>TZ</strong> environment variable needs to be set to
 
888
    <strong>PST8PDT</strong>. Also, the environment variable
 
889
    <strong>ICU_DATA</strong> can be set to the full pathname of the data
 
890
    directory to indicate where the locale data files and conversion mapping
 
891
    tables are. The trailing "/" is required after the directory name (e.g.
 
892
    "$Root/source/data/" will work, but the value "$Root/source/data" is not
 
893
    acceptable). You do not need to set <strong>ICU_DATA</strong> if the
 
894
    complete data library is in your library path.</p>
 
895
 
 
896
    <p><a name="#HowToInstallICU"><strong>Installing ICU NOTE:</strong></a> If
 
897
    you are using the "gmake install" command, using the "--prefix" option on
 
898
    configure or runConfigureICU will install ICU to the specified
 
899
    location.</p>
 
900
 
1166
901
    <p>Some platforms use package management tools to control the installation
1167
902
    and uninstallation of files on the system, as well as the integrity of the
1168
903
    system configuration. You may want to check if ICU can be packaged for your
1169
904
    package management tools by looking into the "packaging" directory. (Please
1170
905
    note that if you are using a snapshot of ICU from CVS, it is probable that
1171
906
    the packaging scripts or related files are not up to date with the contents
1172
 
    of ICU at this time, so use them with caution.)</p>
 
907
    of ICU at this time, so use them with caution).</p>
1173
908
 
1174
909
    <h3><a name="HowToBuildOS390" href="#HowToBuildOS390">OS/390 (zSeries)
1175
910
    Platform</a></h3>
1193
928
      must not be converted, or must be converted back to their original state.
1194
929
      You can use the <a href="as_is/os390/unpax-icu.sh">unpax-icu.sh</a>
1195
930
      script to do this for you automatically. It will unpackage the tar file
1196
 
      and convert all the necessary files for you automatically.
1197
 
      <!--The files that must not be converted to ibm-1047 are the
1198
 
                                            following:
1199
 
 
1200
 
                                            <ul>
1201
 
                                              <li>All UTF-8 files</li>
1202
 
 
1203
 
                                              <li>icu/data/*.brk</li>
1204
 
 
1205
 
                                              <li>icu/source/test/testdata/uni-text.bin</li>
1206
 
 
1207
 
                                              <li>icu/source/test/testdata/th18057.txt</li>
1208
 
                                            </ul>
1209
 
                                            Such a conversion can be done using iconv:<br>
1210
 
                                             <code>iconv -f IBM-1047 -t ISO8859-1 uni-text.bin &gt;
1211
 
                                            uni-text.bin</code-->
1212
 
      </li>
 
931
      and convert all the necessary files for you automatically.</li>
1213
932
 
1214
933
      <li>
1215
934
        <p>OS/390 supports both native S/390 hexadecimal floating point and,
1247
966
        correct. Building and testing ICU without using gmake requires that the
1248
967
        ICU libraries in the LIBPATH. In other words, the LIBPATH should
1249
968
        contain (each path prepended with the root directory that contains the
1250
 
        icu directory):
 
969
        icu directory): 
1251
970
 
1252
971
        <ul>
1253
972
          <li>icu/source/common</li>
1331
1050
 
1332
1051
    <ul>
1333
1052
      <li>
1334
 
        Requirements:
 
1053
        Requirements: 
1335
1054
 
1336
1055
        <ul>
1337
1056
          <li>QSHELL interpreter installed (install base option 30, operating
1349
1068
      </li>
1350
1069
 
1351
1070
      <li>
1352
 
        Build environment setup:
 
1071
        Build environment setup: 
1353
1072
 
1354
1073
        <ol>
1355
1074
          <li>
1357
1076
            the resulting modules, programs and service programs. You will
1358
1077
            specify this library on the OUTPUTDIR environment variable in step
1359
1078
            2.<br>
1360
 
 
 
1079
             
1361
1080
<pre>
1362
1081
<samp>CRTLIB LIB(<i>libraryname</i>)</samp>
1363
1082
</pre>
1366
1085
 
1367
1086
          <li>
1368
1087
            Set up the following environment variables in your build process
1369
 
            (use the <i>libraryname</i> from the previous step)
 
1088
            (use the <i>libraryname</i> from the previous step) 
1370
1089
<pre>
1371
1090
<samp>ADDENVVAR ENVVAR(ICU_DATA) VALUE('/icu/source/data')
1372
1091
ADDENVVAR ENVVAR(CC) VALUE('/usr/bin/icc')
1379
1098
            <br>
1380
1099
          </li>
1381
1100
          <!--li>Add QCXXN, to your build process library list. This results in
1382
 
                                                                      the resolution of CRTCPPMOD used by the icc compiler</li-->
 
1101
                                                                                                                                                                                                                                      the resolution of CRTCPPMOD used by the icc compiler</li-->
1383
1102
 
1384
1103
          <li>
1385
1104
            In order to get the tests to run correctly, the QUTCOFFSET needs to
1386
1105
            be set to the Pacific Time Zone offset.<br>
1387
1106
            <br>
1388
 
             To check your QUTCOFFSET:
 
1107
             To check your QUTCOFFSET: 
1389
1108
<pre>
1390
1109
<samp>DSPSYSVAL SYSVAL(QUTCOFFSET)</samp>
1391
1110
</pre>
1433
1152
    <h4>DLL directories and the PATH setting</h4>
1434
1153
 
1435
1154
    <p>As delivered, the International Components for Unicode build as several
1436
 
    DLLs which are placed in the "<i>&lt;ICU&gt;</i>\bin" directory. You must
 
1155
    DLLs, which are placed in the "<i>&lt;ICU&gt;</i>\bin" directory. You must
1437
1156
    add this directory to the PATH environment variable in your system, or any
1438
1157
    executables you build will not be able to access International Components
1439
1158
    for Unicode libraries. Alternatively, you can copy the DLL files into a
1463
1182
      PATH=%PATH%;<i>&lt;ICU&gt;</i>\bin"</li>
1464
1183
    </ul>
1465
1184
 
1466
 
    <p>Note: when packaging a Windows application for distribution and
1467
 
    installation on user systems, copies of the ICU dlls should be included
 
1185
    <p>Note: When packaging a Windows application for distribution and
 
1186
    installation on user systems, copies of the ICU DLLs should be included
1468
1187
    with the application, and installed for exclusive use by the application.
1469
1188
    This is the only way to insure that your app is running with the same
1470
1189
    version of ICU, built with exactly the same options, that you developed and
1471
 
    tested with. Refer to Microsoft's guidelines on the usage of dlls, or
1472
 
    search for the phrase "dll hell" on <a href=
 
1190
    tested with. Refer to Microsoft's guidelines on the usage of DLLs, or
 
1191
    search for the phrase "DLL hell" on <a href=
1473
1192
    "http://msdn.microsoft.com/">msdn.microsoft.com</a>.</p>
1474
1193
 
1475
1194
    <h4>Linking with Runtime libraries</h4>
1485
1204
    <h3><a name="ImportantNotesUnix" href="#ImportantNotesUnix">Unix Type
1486
1205
    Platform</a></h3>
1487
1206
 
1488
 
    <p>If you are building on a Unix platform, it is important that you add the
1489
 
    location of your ICU libraries (including the data library) to your
1490
 
    LD_LIBRARY_PATH environment variable. The ICU libraries may not link or
1491
 
    load properly without doing this.</p>
 
1207
    <p>If you are building on a Unix platform, and if you are installing ICU in
 
1208
    a non-standard location, you may need to add the location of your ICU
 
1209
    libraries to your <strong>LD_LIBRARY_PATH</strong> environment variable (or
 
1210
    the equivalent runtime library path environment variable for your system).
 
1211
    The ICU libraries may not link or load properly without doing this.</p>
 
1212
 
 
1213
    <p>Note that if you do not want to have to set this variable, you may
 
1214
    instead use the --enable-rpath option at configuration time. This option
 
1215
    will instruct the linker to always look for the libraries where they are
 
1216
    installed. You will need to use the appropriate linker options when linking
 
1217
    your own applications and libraries against ICU, too. Please refer to your
 
1218
    system's linker manual for information about runtime paths. The use of
 
1219
    rpath also means that when building a new version of ICU you should not
 
1220
    have an older version installed in the same place as the new version's
 
1221
    installation directory, as the older libraries will used during the build,
 
1222
    instead of the new ones, likely leading to an incorrectly build ICU. (This
 
1223
    is the proper behavior of rpath.)</p>
1492
1224
 
1493
1225
    <h3><a name="ImportantNotesDefaultCP" href="#ImportantNotesDefaultCP">Using
1494
1226
    the default codepage</a></h3>
1576
1308
    <p>Deprecated C++ APIs cannot be enabled without recompiling ICU libraries.
1577
1309
    Every service has a specific symbol that should be defined to enable the
1578
1310
    deprecated API of that service. For example: To enable deprecated APIs in
1579
 
    Transliteration service, the U_USE_DEPRECATED_TRANSLITERATOR_API symbol
 
1311
    transliteration service, the U_USE_DEPRECATED_TRANSLITERATOR_API symbol
1580
1312
    should be defined before compiling ICU.</p>
1581
1313
 
1582
1314
    <h2><a name="PlatformDependencies" href="#PlatformDependencies">Platform
1592
1324
         <strong>unicode/p<i>XXXX</i>.h</strong> (others: pwin32.h, pmacos.h,
1593
1325
        ..): Platform-dependent typedefs and defines:<br>
1594
1326
        <br>
1595
 
 
 
1327
         
1596
1328
 
1597
1329
        <ul>
1598
1330
          <li>XP_CPLUSPLUS for C++ only.</li>
1609
1341
        <strong>unicode/putil.h, putil.c</strong>: platform-dependent
1610
1342
        implementations of various functions that are platform dependent:<br>
1611
1343
        <br>
1612
 
 
 
1344
         
1613
1345
 
1614
1346
        <ul>
1615
1347
          <li>uprv_isNaN, uprv_isInfinite, uprv_getNaN and uprv_getInfinity for
1616
1348
          handling special floating point values.</li>
1617
1349
 
1618
1350
          <li>uprv_tzset, uprv_timezone, uprv_tzname and time for getting
1619
 
          platform specific time and timezone information.</li>
 
1351
          platform specific time and time zone information.</li>
1620
1352
 
1621
1353
          <li>u_getDataDirectory for getting the default data directory.</li>
1622
1354
 
1637
1369
        global data against simultaneous modifications. See Users' guide for
1638
1370
        more information.<br>
1639
1371
        <br>
1640
 
 
 
1372
         
1641
1373
 
1642
1374
        <ul>
1643
1375
          <li>We supply sample implementations for WinNT, Win95, Win98,
1652
1384
      <br>
1653
1385
      </li>
1654
1386
 
1655
 
      <li>For the Intltest test suite, intltest.cpp in
 
1387
      <li>For the intltest test suite, intltest.cpp in
1656
1388
      "icu/source/test/intltest/" contains the method pathnameInContext, which
1657
1389
      must also be adapted to any new platform.</li>
1658
1390
 
1676
1408
 
1677
1409
      <li>makeconv</li>
1678
1410
 
 
1411
      <li>gencnval</li>
 
1412
 
1679
1413
      <li>genrb</li>
1680
1414
 
1681
1415
      <li>gentz</li>
1682
1416
 
1683
 
      <li>genccode</li>
1684
 
 
1685
1417
      <li>gennames</li>
1686
1418
 
1687
1419
      <li>genuca</li>
1688
1420
 
1689
1421
      <li>gennorm</li>
1690
1422
 
 
1423
      <li>genccode</li>
 
1424
 
 
1425
      <li>gencmn</li>
 
1426
 
 
1427
      <li>pkgdata</li>
 
1428
 
1691
1429
      <li>makedata (a project on Windows, or source/data/Makefile on Unix)</li>
1692
1430
 
1693
1431
      <li>ctestfw, intltest and cintltst, if you want to run the test