1 Copyright (C) 2016 and later: Unicode, Inc. and others.
2 License & terms of use: http://www.unicode.org/copyright.html#License
4 Copyright (C) 2002-2010, International Business Machines
5 Corporation and others. All Rights Reserved.
7 convsamp: a sample program which demonstrates using ICU conversion
9 This sample demonstrates
10 Opening and closing converters using the C api
11 String manipulation in C
12 Writing a custom conversion callback function
16 convsamp.c Main source file
17 flagcb.h codepage output convenience header
18 flagcb.c codepage output convenience implementation
19 ucnv.sln Windows MSVC workspace. Double-click this to get started.
20 ucnv.vcproj Windows MSVC project file
22 To Build ucnv on Windows
23 1. Install and build ICU
24 2. In MSVC, open the workspace file icu\samples\ucnv\ucnv.sln
25 3. Choose a Debug or Release build.
29 1. Start a command shell window
30 2. Add ICU's bin directory to the path, e.g.
31 set PATH=c:\icu\bin;%PATH%
32 (Use the path to where ever ICU is on your system.)
33 3. cd into the ufortune directory, e.g.
34 cd c:\icu\source\samples\ucnv\debug
37 WARNING: The .bin and .txt files must be in the same directory as the executable, which is not the case by default on some systems.
41 Specify an ICU install directory when running configure,
42 using the --prefix option. The steps to build ICU will look something
44 cd <icu directory>/source
45 runConfigureICU <platform-name> --prefix <icu install directory> [other options]
52 set the variable ICU_PREFIX=<icu install>
56 cd <icu directory>/source/samples/ucnv
61 export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
65 Note: The name of the LD_LIBRARY_PATH variable is different on some systems.
66 If in doubt, run the sample using "gmake check", and note the name of
67 the variable that is used there. LD_LIBRARY_PATH is the correct name
68 for Linux and Solaris.