BIDICharMap.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:12k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * bidicharmap.c
- *
- * Project:
- * --------
- * Maui_Software
- *
- * Description:
- * ------------
- * bidirectional algorithm engine
- *
- *
- * Author:
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- *****************************************************************************/
- /*
- * Copyright Notice
- * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
- * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
- * (It is illegal to remove this copyright notice from this software or any
- * portion of it)
- */
- /**************************************************************
- FILENAME : BIDICharMap.c
- PURPOSE : BIDICHAR TYPE MAP
- REMARKS : nil
- AUTHOR :
- DATE :
- **************************************************************/
- #include "BidiDef.h"
- const BIDICHAR_TYPE_MAP bidiCharTypeMap[] =
- {
- {ON, 0x06, 0x0000},
- {NSM, 0x04, 0x0006},
- {BIDI_B, 0x01, 0x000a},
- {ON, 0x02, 0x000b},
- {BIDI_B, 0x01, 0x000d},
- {ON, 0x05, 0x000e},
- {WS, 0x01, 0x0013},
- /* MTK Elvis to modify 0x1c ~ 0x1f char type for sms chat */
- {ON, 0x08, 0x0014},
- {BIDI_L, 0x04, 0x001c},
- {WS, 0x01, 0x0020},
- {ON, 0x02, 0x0021},
- {ET, 0x03, 0x0023},
- {ON, 0x05, 0x0026},
- {ET, 0x01, 0x002b},
- {CS, 0x02, 0x002c},
- {ES, 0x02, 0x002e},
- {EN, 0x0a, 0x0030},
- {CS, 0x01, 0x003a},
- {ON, 0x06, 0x003b},
- {BIDI_L, 0x1a, 0x0041},
- {ON, 0x01, 0x005b},
- {BIDI_B, 0x01, 0x005c},
- {ON, 0x03, 0x005d},
- {NSM, 0x01, 0x0060},
- {BIDI_L, 0x1a, 0x0061},
- {ON, 0x01, 0x007b},
- {S, 0x01, 0x007c},
- {ON, 0x03, 0x007d},
- {BN, 0x05, 0x0080},
- {BIDI_B, 0x01, 0x0085},
- {BN, 0x1a, 0x0086},
- {CS, 0x01, 0x00a0},
- {ON, 0x01, 0x00a1},
- {ET, 0x04, 0x00a2},
- {ON, 0x04, 0x00a6},
- {BIDI_L, 0x01, 0x00aa},
- {ON, 0x05, 0x00ab},
- {ET, 0x02, 0x00b0},
- {EN, 0x02, 0x00b2},
- {ON, 0x01, 0x00b4},
- {BIDI_L, 0x01, 0x00b5},
- {ON, 0x03, 0x00b6},
- {EN, 0x01, 0x00b9},
- {BIDI_L, 0x01, 0x00ba},
- {ON, 0x05, 0x00bb},
- {BIDI_L, 0x17, 0x00c0},
- {ON, 0x01, 0x00d7},
- {BIDI_L, 0x1f, 0x00d8},
- {ON, 0x01, 0x00f7},
- {BIDI_L, 0x29, 0x00f8},
- {BIDI_L, 0x12, 0x0222},
- {BIDI_L, 0x5e, 0x0250},
- {BIDI_L, 0x09, 0x02b0},
- {ON, 0x02, 0x02b9},
- {BIDI_L, 0x07, 0x02bb},
- {ON, 0x0e, 0x02c2},
- {BIDI_L, 0x02, 0x02d0},
- {ON, 0x0e, 0x02d2},
- {BIDI_L, 0x05, 0x02e0},
- {ON, 0x09, 0x02e5},
- {BIDI_L, 0x01, 0x02ee},
- {NSM, 0x50, 0x0300},
- {NSM, 0x10, 0x0360},
- {BIDI_L, 0x83, 0x0400},
- {NSM, 0x04, 0x0483},
- {NSM, 0x02, 0x0488},
- {BIDI_L, 0x45, 0x048a},
- {BIDI_L, 0x26, 0x04d0},
- {BIDI_L, 0x02, 0x04f8},
- {BIDI_L, 0x10, 0x0500},
- {AL, 0x11, 0x0591}, /* HEBREW */
- {AL, 0x17, 0x05a3}, /* HEBREW */
- {AL, 0x0A, 0x05bb}, /* HEBREW */
- {AL, 0x1B, 0x05d0}, /* HEBREW */
- {AL, 0x05, 0x05f0}, /* HEBREW */
- {CS, 0x01, 0x060c},
- {AL, 0x01, 0x061b},
- {AL, 0x01, 0x061f},
- {AL, 0x1a, 0x0621},
- {AL, 0x0b, 0x0640},
- {NSM, 0x0b, 0x064b},
- {AN, 0x0a, 0x0660},
- {ET, 0x01, 0x066a},
- {AN, 0x02, 0x066b},
- {AL, 0x03, 0x066d},
- {NSM, 0x01, 0x0670},
- {AL, 0x65, 0x0671},
- {NSM, 0x07, 0x06d6},
- {AL, 0x01, 0x06dd},
- {NSM, 0x07, 0x06de},
- {AL, 0x02, 0x06e5},
- {NSM, 0x02, 0x06e7},
- {ON, 0x01, 0x06e9},
- {NSM, 0x04, 0x06ea},
- {EN, 0x0a, 0x06f0},
- {AL, 0x05, 0x06fa},
- {BIDI_L, 0x30, 0x0e01},
- {NSM, 0x01, 0x0e31},
- {BIDI_L, 0x02, 0x0e32},
- {NSM, 0x07, 0x0e34},
- {ET, 0x01, 0x0e3f},
- {BIDI_L, 0x07, 0x0e40},
- {NSM, 0x08, 0x0e47},
- {BIDI_L, 0x0d, 0x0e4f},
- {BIDI_L, 0x9c, 0x1e00},
- {BIDI_L, 0x5a, 0x1ea0},
- {WS, 0x0b, 0x2000},
- {BN, 0x03, 0x200b},
- {BIDI_L, 0x01, 0x200e},
- {BIDI_R, 0x01, 0x200f},
- {ON, 0x18, 0x2010},
- {WS, 0x01, 0x2028},
- {BIDI_B, 0x01, 0x2029},
- {LRE, 0x01, 0x202a},
- {RLE, 0x01, 0x202b},
- {PDF, 0x01, 0x202c},
- {LRO, 0x01, 0x202d},
- {RLO, 0x01, 0x202e},
- {WS, 0x01, 0x202f},
- {ET, 0x05, 0x2030},
- {ON, 0x1e, 0x2035},
- {ON, 0x01, 0x2057},
- {WS, 0x01, 0x205f},
- {BN, 0x04, 0x2060},
- {BN, 0x06, 0x206a},
- {EN, 0x01, 0x2070},
- {BIDI_L, 0x01, 0x2071},
- {EN, 0x06, 0x2074},
- {ET, 0x02, 0x207a},
- {ON, 0x03, 0x207c},
- {BIDI_L, 0x01, 0x207f},
- {EN, 0x0a, 0x2080},
- {ET, 0x02, 0x208a},
- {ON, 0x03, 0x208c},
- {ET, 0x12, 0x20a0},
- {NSM, 0x1b, 0x20d0},
- {ON, 0x02, 0x2100},
- {BIDI_L, 0x01, 0x2102},
- {ON, 0x04, 0x2103},
- {BIDI_L, 0x01, 0x2107},
- {ON, 0x02, 0x2108},
- {BIDI_L, 0x0a, 0x210a},
- {ON, 0x01, 0x2114},
- {BIDI_L, 0x01, 0x2115},
- {ON, 0x03, 0x2116},
- {BIDI_L, 0x05, 0x2119},
- {ON, 0x06, 0x211e},
- {BIDI_L, 0x01, 0x2124},
- {ON, 0x01, 0x2125},
- {BIDI_L, 0x01, 0x2126},
- {ON, 0x01, 0x2127},
- {BIDI_L, 0x01, 0x2128},
- {ON, 0x01, 0x2129},
- {BIDI_L, 0x04, 0x212a},
- {ET, 0x01, 0x212e},
- {BIDI_L, 0x03, 0x212f},
- {ON, 0x01, 0x2132},
- {BIDI_L, 0x07, 0x2133},
- {ON, 0x01, 0x213a},
- {BIDI_L, 0x03, 0x213d},
- {ON, 0x05, 0x2140},
- {BIDI_L, 0x05, 0x2145},
- {ON, 0x02, 0x214a},
- {ON, 0x0d, 0x2153},
- {BIDI_L, 0x24, 0x2160},
- {ON, 0x82, 0x2190},
- {ET, 0x02, 0x2212},
- {ON, 0x22, 0x2214},
- {BIDI_L, 0x45, 0x2336},
- {ON, 0x1a, 0x237b},
- {BIDI_L, 0x01, 0x2395},
- {ON, 0x39, 0x2396},
- {ON, 0x27, 0x2400},
- {ON, 0x0b, 0x2440},
- {EN, 0x3c, 0x2460},
- {BIDI_L, 0x4e, 0x249c},
- {EN, 0x01, 0x24ea},
- {ON, 0x14, 0x24eb},
- {ON, 0x14, 0x2500},
- {ON, 0x02, 0x2616},
- {ON, 0x65, 0x2619},
- {ON, 0x0a, 0x2680},
- {ON, 0x04, 0x2701},
- {ON, 0x04, 0x2706},
- {ON, 0x1c, 0x270c},
- {ON, 0x23, 0x2729},
- {ON, 0x01, 0x274d},
- {ON, 0x04, 0x274f},
- {ON, 0x01, 0x2756},
- {ON, 0x07, 0x2758},
- {ON, 0x34, 0x2761},
- {ON, 0x18, 0x2798},
- {ON, 0x0e, 0x27b1},
- {ON, 0x1c, 0x27d0},
- {ON, 0x10, 0x27f0},
- {ON, 0x1a, 0x2e80},
- {ON, 0x59, 0x2e9b},
- {ON, 0xd6, 0x2f00},
- {ON, 0x0c, 0x2ff0},
- {WS, 0x01, 0x3000},
- {ON, 0x04, 0x3001},
- {BIDI_L, 0x03, 0x3005},
- {ON, 0x19, 0x3008},
- {BIDI_L, 0x09, 0x3021},
- {NSM, 0x06, 0x302a},
- {ON, 0x01, 0x3030},
- {BIDI_L, 0x05, 0x3031},
- {ON, 0x02, 0x3036},
- {BIDI_L, 0x05, 0x3038},
- {ON, 0x03, 0x303d},
- {BIDI_L, 0x56, 0x3041},
- {NSM, 0x02, 0x3099},
- {ON, 0x02, 0x309b},
- {BIDI_L, 0x03, 0x309d},
- {ON, 0x01, 0x30a0},
- {BIDI_L, 0x5a, 0x30a1},
- {ON, 0x01, 0x30fb},
- {BIDI_L, 0x04, 0x30fc},
- {BIDI_L, 0x28, 0x3105},
- {BIDI_L, 0x5e, 0x3131},
- {BIDI_L, 0x28, 0x3190},
- {BIDI_L, 0x2d, 0x31f0},
- {BIDI_L, 0x24, 0x3220},
- {ON, 0x0f, 0x3251},
- {BIDI_L, 0x1c, 0x3260},
- {BIDI_L, 0x32, 0x327f},
- {ON, 0x0f, 0x32b1},
- {BIDI_L, 0x0c, 0x32c0},
- {BIDI_L, 0x2f, 0x32d0},
- {BIDI_L, 0x77, 0x3300},
- {BIDI_L, 0x63, 0x337b},
- {BIDI_L, 0x1f, 0x33e0},
- {BIDI_L, 0x01, 0x3400},
- {BIDI_L, 0x01, 0x4db5},
- {BIDI_L, 0x01, 0x4e00},
- {BIDI_L, 0x01, 0x9fa5},
- {BIDI_L, 0x2e, 0xf900},
- {BIDI_L, 0x3b, 0xfa30},
- {BIDI_L, 0x07, 0xfb00},
- {AL, 0x62, 0xfb50},
- {AL, 0x6b, 0xfbd3},
- {ON, 0x02, 0xfd3e},
- {AL, 0x40, 0xfd50},
- {AL, 0x36, 0xfd92},
- {AL, 0x0d, 0xfdf0},
- {NSM, 0x10, 0xfe00},
- {NSM, 0x04, 0xfe20},
- {ON, 0x17, 0xfe30},
- {ON, 0x07, 0xfe49},
- {CS, 0x01, 0xfe50},
- {ON, 0x01, 0xfe51},
- {CS, 0x01, 0xfe52},
- {ON, 0x01, 0xfe54},
- {CS, 0x01, 0xfe55},
- {ON, 0x09, 0xfe56},
- {ET, 0x01, 0xfe5f},
- {ON, 0x02, 0xfe60},
- {ET, 0x02, 0xfe62},
- {ON, 0x03, 0xfe64},
- {ON, 0x01, 0xfe68},
- {ET, 0x02, 0xfe69},
- {ON, 0x01, 0xfe6b},
- {AL, 0x05, 0xfe70},
- {AL, 0x87, 0xfe76},
- {BN, 0x01, 0xfeff},
- {ON, 0x02, 0xff01},
- {ET, 0x03, 0xff03},
- {ON, 0x05, 0xff06},
- {ET, 0x01, 0xff0b},
- {CS, 0x01, 0xff0c},
- {ET, 0x01, 0xff0d},
- {CS, 0x01, 0xff0e},
- {ES, 0x01, 0xff0f},
- {EN, 0x0a, 0xff10},
- {CS, 0x01, 0xff1a},
- {ON, 0x06, 0xff1b},
- {BIDI_L, 0x1a, 0xff21},
- {ON, 0x06, 0xff3b},
- {BIDI_L, 0x1a, 0xff41},
- {ON, 0x0b, 0xff5b},
- {BIDI_L, 0x59, 0xff66},
- {BIDI_L, 0x06, 0xffc2},
- {BIDI_L, 0x06, 0xffca},
- {BIDI_L, 0x06, 0xffd2},
- {BIDI_L, 0x03, 0xffda},
- {ET, 0x02, 0xffe0},
- {ON, 0x03, 0xffe2},
- {ET, 0x02, 0xffe5},
- {ON, 0x07, 0xffe8},
- {BN, 0x03, 0xfff9},
- {ON, 0x02, 0xfffc}
- };
- const BIDICHAR_MIRROR_MAP bidiCharMirror[] =
- {
- {0x0028, 0x0029},
- {0x003c, 0x003e},
- {0x005b, 0x005d},
- {0x007b, 0x007d},
- {0x00ab, 0x00bb},
- {0x2039, 0x203a},
- {0x2045, 0x2046},
- {0x207d, 0x207e},
- {0x208d, 0x208e},
- {0x2208, 0x220b},
- {0x2209, 0x220c},
- {0x220a, 0x220d},
- {0x2215, 0x29f5},
- {0x2768, 0x2769},
- {0x276a, 0x276b},
- {0x276c, 0x276d},
- {0x276e, 0x276f},
- {0x2770, 0x2771},
- {0x2772, 0x2773},
- {0x2774, 0x2775},
- {0x27d5, 0x27d6},
- {0x27dd, 0x27de},
- {0x27e2, 0x27e3},
- {0x27e4, 0x27e5},
- {0x27e6, 0x27e7},
- {0x27e8, 0x27e9},
- {0x27ea, 0x27eb},
- {0x3008, 0x3009},
- {0x300a, 0x300b},
- {0x300c, 0x300d},
- {0x300e, 0x300f},
- {0x3010, 0x3011},
- {0x3014, 0x3015},
- {0x3016, 0x3017},
- {0x3018, 0x3019},
- {0x301a, 0x301b},
- {0xff08, 0xff09},
- {0xff1c, 0xff1e},
- {0xff3b, 0xff3d},
- {0xff5b, 0xff5d},
- {0xff5f, 0xff60},
- {0xff62, 0xff63}
- };
- U16 nMaxIndexBidiTypeMap = sizeof(bidiCharTypeMap) / sizeof(BIDICHAR_TYPE_MAP);
- U16 nMaxIndexBidiMirror = sizeof(bidiCharMirror) / sizeof(BIDICHAR_MIRROR_MAP);