|
| 1 | +# cppp-reiconv |
| 2 | +A character set conversion library based on GNU LIBICONV. |
| 3 | + |
| 4 | +# Instruction |
| 5 | +This library provides some charset conversation function for The C++ Plus Project. |
| 6 | + |
| 7 | +It provides support for the encodings: |
| 8 | + |
| 9 | ++ European languages |
| 10 | + - ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16}, |
| 11 | + - KOI8-R, KOI8-U, KOI8-RU, |
| 12 | + - CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131}, |
| 13 | + - Mac{Roman,CentralEurope,Iceland,Croatian,Romania}, |
| 14 | + - Mac{Cyrillic,Ukraine,Greek,Turkish}, |
| 15 | + - Macintosh |
| 16 | ++ Semitic languages |
| 17 | + - ISO-8859-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic} |
| 18 | ++ Japanese |
| 19 | + - EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1, |
| 20 | + - ISO-2022-JP-MS |
| 21 | ++ Chinese |
| 22 | + - EUC-CN, HZ, GBK, CP936, GB18030, GB18030:2022, EUC-TW, BIG5, CP950, |
| 23 | + - BIG5-HKSCS, BIG5-HKSCS:2004, BIG5-HKSCS:2001, BIG5-HKSCS:1999, |
| 24 | + - ISO-2022-CN, ISO-2022-CN-EXT |
| 25 | ++ Korean |
| 26 | + - EUC-KR, CP949, ISO-2022-KR, JOHAB |
| 27 | ++ Armenian |
| 28 | + - ARMSCII-8 |
| 29 | ++ Georgian |
| 30 | + - Georgian-Academy, Georgian-PS |
| 31 | ++ Tajik |
| 32 | + - KOI8-T |
| 33 | ++ Kazakh |
| 34 | + - PT154, RK1048 |
| 35 | ++ Thai |
| 36 | + - ISO-8859-11, TIS-620, CP874, MacThai |
| 37 | ++ Laotian |
| 38 | + - MuleLao-1, CP1133 |
| 39 | ++ Vietnamese |
| 40 | + - VISCII, TCVN, CP1258 |
| 41 | ++ Platform specifics |
| 42 | + - HP-ROMAN8, NEXTSTEP |
| 43 | ++ Full Unicode |
| 44 | + - UTF-8 |
| 45 | + - UCS-2, UCS-2BE, UCS-2LE |
| 46 | + - UCS-4, UCS-4BE, UCS-4LE |
| 47 | + - UTF-16, UTF-16BE, UTF-16LE |
| 48 | + - UTF-32, UTF-32BE, UTF-32LE |
| 49 | + - UTF-7 |
| 50 | + - C99, JAVA |
| 51 | ++ Full Unicode, in terms of 'uint16_t' or 'uint32_t' |
| 52 | + - (with machine dependent endianness and alignment) |
| 53 | + - UCS-2-INTERNAL, UCS-4-INTERNAL |
| 54 | + |
| 55 | +When configured with the option -DENABLE_EXTRA, it also provides |
| 56 | +support for a few extra encodings: |
| 57 | + |
| 58 | ++ European languages |
| 59 | + - CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125} |
| 60 | ++ Semitic languages |
| 61 | + - CP864 |
| 62 | ++ Japanese |
| 63 | + - EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3 |
| 64 | ++ Chinese |
| 65 | + - BIG5-2003 (experimental) |
| 66 | ++ Turkmen |
| 67 | + - TDS565 |
| 68 | ++ Platform specifics |
| 69 | + - ATARIST, RISCOS-LATIN1 |
| 70 | ++ EBCDIC compatible (not ASCII compatible, very rarely used) |
| 71 | + - European languages |
| 72 | + - - IBM-{037,273,277,278,280,282,284,285,297,423,500,870,871,875,880}, |
| 73 | + - - IBM-{905,924,1025,1026,1047,1112,1122,1123,1140,1141,1142,1143}, |
| 74 | + - - IBM-{1144,1145,1146,1147,1148,1149,1153,1154,1155,1156,1157,1158}, |
| 75 | + - - IBM-{1165,1166,4971} |
| 76 | + - Semitic languages |
| 77 | + - - IBM-{424,425,12712,16804} |
| 78 | + - Persian |
| 79 | + - - IBM-1097 |
| 80 | + - Thai |
| 81 | + - - IBM-{838,1160} |
| 82 | + - Laotian |
| 83 | + - - IBM-1132 |
| 84 | + - Vietnamese |
| 85 | + - - IBM-{1130,1164} |
| 86 | + - Indic languages |
| 87 | + - - IBM-1137 |
| 88 | + |
| 89 | +It can convert from any of these encodings to any other, through Unicode |
| 90 | +conversion. |
| 91 | + |
| 92 | +cppp-reiconv is for you if your application needs to support multiple character |
| 93 | +encodings, but that support lacks from your system. |
| 94 | + |
| 95 | + |
| 96 | +# Build and installation |
| 97 | + |
| 98 | +We use CMake for build |
| 99 | + |
| 100 | ++ Standard build |
| 101 | +```shell |
| 102 | +mkdir build |
| 103 | +cd build |
| 104 | +cmake .. -DCMAKE_INSTALL_PREFIX=[[PREFIX]] |
| 105 | +cmake --build . --config=Release |
| 106 | +cmake --install . |
| 107 | +``` |
| 108 | + |
| 109 | ++ Full build |
| 110 | +```shell |
| 111 | +mkdir build |
| 112 | +cd build |
| 113 | +cmake .. -DCMAKE_INSTALL_PREFIX=[[PREFIX]] -DENABLE_EXTRA=ON |
| 114 | +cmake --build . --config=Release |
| 115 | +cmake --install . |
| 116 | +``` |
| 117 | + |
| 118 | +When use full build, extra encodings and features will be enabled. |
| 119 | +iconv string will suport autodetect input encoding. |
| 120 | + |
| 121 | ++ Build with test suite |
| 122 | +```shell |
| 123 | +mkdir build |
| 124 | +cd build |
| 125 | +cmake .. -DCMAKE_INSTALL_PREFIX=[[PREFIX]] -DENABLE_EXTRA=ON -DENABLE_TEST=ON |
| 126 | +cmake --build . --config=Release |
| 127 | +cmake --install . |
| 128 | +``` |
| 129 | + |
| 130 | +# Install |
| 131 | +This library installs: |
| 132 | + - a shared library 'libcppp-reiconv.so' or '~.dll' or '~.dylib' ... |
| 133 | + - a static library 'libcppp-reiconv.a' or '~.lib' ... |
| 134 | + - a header file '<cppp/reiconv.hpp>'. |
| 135 | + |
| 136 | +To use it, simply #include <cppp/reiconv.hpp> and import the lib to use the functions. |
| 137 | + |
| 138 | +# Copyright |
| 139 | + |
| 140 | +The cppp-reiconv is under LGPLv3, |
| 141 | +see file [COPYING](./COPYING). |
| 142 | + |
| 143 | +# Download |
| 144 | + |
| 145 | +https://github.com/cppp-project/cppp-reiconv/releases |
| 146 | + |
| 147 | +# Homepage |
| 148 | + |
| 149 | +https://github.com/cppp-project/cppp-reiconv |
| 150 | + |
| 151 | +# Bug reports |
| 152 | + + Create a issue on GitHub [Report now](https://github.com/cppp-project/cppp-reiconv/issues/new/) |
0 commit comments