]> git.saurik.com Git - apple/icu.git/blame - icuSources/samples/ucnv/readme.txt
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / samples / ucnv / readme.txt
CommitLineData
73c04bcf 1Copyright (C) 2002-2005, International Business Machines
b75a7d8f
A
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
73c04bcf
A
16 ucnv.sln Windows MSVC workspace. Double-click this to get started.
17 ucnv.vcproj Windows MSVC project file
b75a7d8f
A
18
19To Build ucnv on Windows
20 1. Install and build ICU
73c04bcf 21 2. In MSVC, open the workspace file icu\samples\ucnv\ucnv.sln
b75a7d8f
A
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