intl/chardet/public/nsDetectionConfident.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef nsDetetctionConfident_h__
     6 #define nsDetetctionConfident_h__
     8 /*
     9   This type is used to indicate how confident the detection module about
    10   the return result.
    12   eNoAnswerYet is used to indicate that the detector have not find out a 
    13                answer yet based on the data it received.
    14   eBestAnswer  is used to indicate that the answer the detector returned
    15                is the best one within the knowledge of the detector.
    16                In other words, the test to all other candidcates fail.
    18                For example, the (Shift_JIS/EUC-JP/ISO-2022-JP) detection
    19                module may return this with answer "Shift_JIS "if it receive 
    20                bytes > 0x80 (which make ISO-2022-JP test failed) and byte 
    21                0x82 (which may EUC-JP test failed)
    23   eSureAnswer  is used to indicate that the detector is 100% sure about the 
    24                answer. 
    25                Exmaple 1; the Shift_JIS/ISO-2022-JP/EUC-JP detector return
    26                this w/ ISO-2022-JP when it hit one of the following ESC seq
    27                   ESC ( J
    28                   ESC $ @
    29                   ESC $ B
    30                Example 2: the detector which can detect UCS2 return w/ UCS2
    31                when the first 2 byte are BOM mark.
    32                Example 3: the Korean detector return ISO-2022-KR when it
    33                hit ESC $ ) C
    35  */
    36 typedef enum {
    37   eNoAnswerYet = 0,
    38   eBestAnswer,
    39   eSureAnswer,
    40   eNoAnswerMatch
    41 } nsDetectionConfident;
    43 #endif /* nsDetetctionConfident_h__ */

mercurial