~ubuntu-branches/ubuntu/lucid/tidy/lucid

« back to all changes in this revision

Viewing changes to src/utf8.h

  • Committer: Bazaar Package Importer
  • Author(s): Jason Thomas
  • Date: 2008-01-20 21:46:03 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080120214603-poklofici9og61tx
Tags: 20080116cvs-2
* debian/control: build depends on xsltproc
  (closes: #461608)
* debian/tidy.preinst,postinst: add code to move old config file
  (closes: #461623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
/* utf8.h -- convert characters to/from UTF-8
5
5
 
6
 
  (c) 1998-2004 (W3C) MIT, ERCIM, Keio University
 
6
  (c) 1998-2006 (W3C) MIT, ERCIM, Keio University
7
7
  See tidy.h for the copyright notice.
8
8
 
9
9
  CVS Info :
10
10
 
11
 
    $Author: terry_teague $ 
12
 
    $Date: 2004/08/02 02:32:47 $ 
13
 
    $Revision: 1.4 $ 
 
11
    $Author: arnaud02 $ 
 
12
    $Date: 2006/09/12 15:14:44 $ 
 
13
    $Revision: 1.5 $ 
14
14
 
15
15
*/
16
16
 
21
21
** Does not convert character "codepoints", i.e. to/from 10646.
22
22
*/
23
23
 
24
 
int DecodeUTF8BytesToChar( uint* c, uint firstByte, ctmbstr successorBytes,
25
 
                           TidyInputSource* inp, int* count );
26
 
 
27
 
int EncodeCharToUTF8Bytes( uint c, tmbstr encodebuf,
28
 
                           TidyOutputSink* outp, int* count );
29
 
 
30
 
 
31
 
uint  GetUTF8( ctmbstr str, uint *ch );
32
 
tmbstr PutUTF8( tmbstr buf, uint c );
 
24
int TY_(DecodeUTF8BytesToChar)( uint* c, uint firstByte, ctmbstr successorBytes,
 
25
                                TidyInputSource* inp, int* count );
 
26
 
 
27
int TY_(EncodeCharToUTF8Bytes)( uint c, tmbstr encodebuf,
 
28
                                TidyOutputSink* outp, int* count );
 
29
 
 
30
 
 
31
uint  TY_(GetUTF8)( ctmbstr str, uint *ch );
 
32
tmbstr TY_(PutUTF8)( tmbstr buf, uint c );
33
33
 
34
34
#define UNICODE_BOM_BE   0xFEFF   /* big-endian (default) UNICODE BOM */
35
35
#define UNICODE_BOM      UNICODE_BOM_BE
37
37
#define UNICODE_BOM_UTF8 0xEFBBBF /* UTF-8 UNICODE BOM */
38
38
 
39
39
 
40
 
Bool    IsValidUTF16FromUCS4( tchar ucs4 );
41
 
Bool    IsHighSurrogate( tchar ch );
42
 
Bool    IsLowSurrogate( tchar ch );
43
 
 
44
 
Bool    IsCombinedChar( tchar ch );
45
 
Bool    IsValidCombinedChar( tchar ch );
46
 
 
47
 
tchar   CombineSurrogatePair( tchar high, tchar low );
48
 
Bool    SplitSurrogatePair( tchar utf16, tchar* high, tchar* low );
 
40
Bool    TY_(IsValidUTF16FromUCS4)( tchar ucs4 );
 
41
Bool    TY_(IsHighSurrogate)( tchar ch );
 
42
Bool    TY_(IsLowSurrogate)( tchar ch );
 
43
 
 
44
Bool    TY_(IsCombinedChar)( tchar ch );
 
45
Bool    TY_(IsValidCombinedChar)( tchar ch );
 
46
 
 
47
tchar   TY_(CombineSurrogatePair)( tchar high, tchar low );
 
48
Bool    TY_(SplitSurrogatePair)( tchar utf16, tchar* high, tchar* low );
49
49
 
50
50
 
51
51