]>
git.saurik.com Git - wxWidgets.git/blob - misc/unictabl/mk_encodings.sh
4 echo " * compiling C source generator..."
6 cc mk_ctable.c
-o mk_ctable
8 echo " * writing copyright info..."
13 * This file is #included by encconv.cpp
16 * *** *** CAUTION! *** ***
17 * Do not modify this file by hand! It is generated by shell
18 * script \$(WXWIN)/misc/unictabl/regenerate
20 * Parts of this file are based on tables published by Unicode, Inc.
21 * Original tables are freely available at
22 * ftp://ftp.unicode.org/Public/MAPPINGS
24 * Original copyright info as present in mapping tables follows:
27 * Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved.
29 * This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
30 * No claims are made as to fitness for any particular purpose. No
31 * warranties of any kind are expressed or implied. The recipient
32 * agrees to determine applicability of information provided. If this
33 * file has been provided on optical media by Unicode, Inc., the sole
34 * remedy for any claim will be exchange of defective media within 90
37 * Unicode, Inc. hereby grants the right to freely use the information
38 * supplied in this file in the creation of products supporting the
39 * Unicode Standard, and to make copies of this file in any form for
40 * internal or external distribution as long as this notice remains
47 echo " * creating C tables..."
51 for i
in mappings
/*.TXT
; do
53 enc
=`echo $i | cut -c10- | tr - _ | sed 's/\.TXT//g' |\
54 sed 's/8859_\(.*\)/ISO8859_\1/g
56 cat $i | sed -n '/^0x...0x..../p' | cut
-f1,2 | \
57 .
/mk_ctable
$i $enc >> unictabl.inc
58 all_encodings
="$all_encodings $enc"
65 echo " * adding fallback..."
74 * Unicode to 7bit ASCII fallback
75 * (for use with wxRECODE_SUBSTITUTE recoding mode)
81 wxUint8 s /*inaccurate substitution*/;
82 } encoding_unicode_fallback[] = {
85 cat Fallbacks
| while read i
; do
86 code
=`echo "$i" | cut -f1`
87 subs
=`echo "$i" | cut -f2 | cut -c1-2,5-6`
88 echo " {$code, $subs}," >> unictabl.inc
90 echo " {0, 0}" >> unictabl.inc
91 echo " };" >> unictabl.inc
93 static const unsigned encoding_unicode_fallback_count = "`cat Fallbacks | wc -l`";" >> unictabl.inc
96 echo " * adding reference table..."
105 * Table of all supported encodings:
109 static const struct {
110 wxFontEncoding encoding; // encoding identifier
111 const wxUint16 *table; // 8bit to unicode table
112 } encodings_list[] = {
115 for i
in $all_encodings ; do
116 echo " { wxFONTENCODING_$i, encoding_table__$i}," >> unictabl.inc
119 echo " {wxFONTENCODING_MAX /*anything*/, NULL}" >> unictabl.inc
120 echo " };" >> unictabl.inc