]> git.saurik.com Git - apple/icu.git/blame - icuSources/samples/ucnv/readme.txt
ICU-6.2.22.tar.gz
[apple/icu.git] / icuSources / samples / ucnv / readme.txt
CommitLineData
b75a7d8f
A
1Copyright (C) 2002-2003, International Business Machines
2Corporation and others. All Rights Reserved.
3
4convsamp: a sample program which demonstrates using ICU conversion
5
6This sample demonstrates
7 Opening and closing converters using the C api
8 String manipulation in C
9 Writing a custom conversion callback function
10
11
12Files:
13 convsamp.c Main source file
14 flagcb.h codepage output convenience header
15 flagcb.c codepage output convenience implementation
16 ucnv.dsw Windows MSVC workspace. Double-click this to get started.
17 ucnv.dsp Windows MSVC project file
18
19To Build ucnv on Windows
20 1. Install and build ICU
21 2. In MSVC, open the workspace file icu\samples\ucnv\ucnv.dsw
22 3. Choose a Debug or Release build.
23 4. Build.
24
25To Run on Windows
26 1. Start a command shell window
27 2. Add ICU's bin directory to the path, e.g.
28 set PATH=c:\icu\bin;%PATH%
29 (Use the path to where ever ICU is on your system.)
30 3. cd into the ufortune directory, e.g.
31 cd c:\icu\source\samples\ucnv\debug
32 4. Run it
33 ucnv
34
35To Build on Unixes
36 1. Build ICU.
37 Specify an ICU install directory when running configure,
38 using the --prefix option. The steps to build ICU will look something
39 like this:
40 cd <icu directory>/source
41 runConfigureICU <platform-name> --prefix <icu install directory> [other options]
42 gmake all
43
44 2. Install ICU,
45 gmake install
46
47 3. Build
48 set the variable ICU_PREFIX=<icu install>
49 gmake all
50
51 To Run on Unixes
52 cd <icu directory>/source/samples/ucnv
53
54 gmake check
55 -or-
56
57 export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
58 convsamp
59
60
61 Note: The name of the LD_LIBRARY_PATH variable is different on some systems.
62 If in doubt, run the sample using "gmake check", and note the name of
63 the variable that is used there. LD_LIBRARY_PATH is the correct name
64 for Linux and Solaris.
65