• Home
Name Date Size #Lines LOC

..--

MakefileD12-May-2024610 264

csdet.cD12-May-20242.1 KiB7847

csdet.vcxprojD12-May-20246.5 KiB128127

csdet.vcxproj.filtersD12-May-2024898 2222

readme.txtD12-May-20242.2 KiB6448

readme.txt

1Copyright (C) 2016 and later: Unicode, Inc. and others.
2License & terms of use: http://www.unicode.org/copyright.html
3
4Copyright (c) 2001-2010 International Business Machines
5Corporation and others. All Rights Reserved.
6uresb: Resource Bundle
7
8This sample demonstrates
9        Using ICU's CharSet Detection API
10
11
12Files:
13    csdet.c        Main source file
14    *.txt          Various sample .txt files
15
16To Build uresb on Windows
17    1.  Install and build ICU
18    2.  In MSVC, open the workspace file icu\samples\uresb\uresb.sln
19    3.  Choose a Debug or Release build.
20    4.  Build.
21
22To Run on Windows
23    1.  Start a command shell window
24    2.  Add ICU's bin directory to the path, e.g.
25            set PATH=c:\icu\bin;%PATH%
26        (Use the path to where ever ICU is on your system.)
27    3.  cd into the uresb directory, e.g.
28            cd c:\icu\source\samples\uresb\debug
29    4.  Run it  (with a locale name, ex. english)
30            csdet eucJP.txt
31    WARNING: The .txt files must be in the same directory as the executable, which is not the case by default on some systems.
32
33To Build on Unixes
34    1.  Build ICU.
35        Specify an ICU install directory when running configure,
36        using the --prefix option.  The steps to build ICU will look something
37        like this:
38           cd <icu directory>/source
39           runConfigureICU <platform-name> --prefix <icu install directory> [other options]
40           gmake all
41
42    2.  Install ICU,
43           gmake install
44
45    3.  Compile
46           cd <icu directory>/source/samples/uresb
47           gmake ICU_PREFIX=<icu install directory) ICU_PATH=<icu source directory>
48
49 To Run on Unixes
50           cd <icu directory>/source/samples/uresb
51
52           gmake ICU_PREFIX=<icu install directory>  check
53               -or-
54
55           export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
56           csdet eucJP.txt
57
58
59 Note:  The name of the LD_LIBRARY_PATH variable is different on some systems.
60        If in doubt, run the sample using "gmake check", and note the name of
61        the variable that is used there.  LD_LIBRARY_PATH is the correct name
62        for Linux and Solaris.
63
64