ConvertUTF.c File Reference

#include "ConvertUTF.h"

Include dependency graph for ConvertUTF.c:

Include dependency graph

Go to the source code of this file.

Defines

#define UNI_SUR_HIGH_START   (UTF32)0xD800
#define UNI_SUR_HIGH_END   (UTF32)0xDBFF
#define UNI_SUR_LOW_START   (UTF32)0xDC00
#define UNI_SUR_LOW_END   (UTF32)0xDFFF
#define false   0
#define true   1

Functions

ConversionResult ConvertUTF32toUTF16 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
ConversionResult ConvertUTF16toUTF32 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
ConversionResult ConvertUTF16toUTF8 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
Boolean isLegalUTF8 (const UTF8 *source, int length)
Boolean isLegalUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd)
ConversionResult ConvertUTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
ConversionResult ConvertUTF32toUTF8 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
ConversionResult ConvertUTF8toUTF32 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)

Variables

const int halfShift = 10
const UTF32 halfBase = 0x0010000UL
const UTF32 halfMask = 0x3FFUL
const char trailingBytesForUTF8 [256]
const UTF32 offsetsFromUTF8 [6]
const UTF8 firstByteMark [7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }


Define Documentation

#define false   0
 

Definition at line 56 of file ConvertUTF.c.

Referenced by AbstractAudioDecodeInputPin::AbstractAudioDecodeInputPin(), AbstractAudioEncodeInputPin::AbstractAudioEncodeInputPin(), AbstractVideoDecodeInputPin::AbstractVideoDecodeInputPin(), AbstractVideoEncodeInputPin::AbstractVideoEncodeInputPin(), AnxPageInterleaver::AnxPageInterleaver(), AnxStreamMapper::AnxStreamMapper(), AutoAnxSeekTable::AutoAnxSeekTable(), AutoOggSeekTable::AutoOggSeekTable(), CMMLDecodeFilter::CMMLDecodeFilter(), FLACDecodeInputPin::FLACDecodeInputPin(), FLACEncodeInputPin::FLACEncodeInputPin(), FLACHeaderTweaker::FLACHeaderTweaker(), FLACPushDecoder::FLACPushDecoder(), HTTPFileSource::HTTPFileSource(), HTTPSocket::HTTPSocket(), NativeFLACSourceFilter::NativeFLACSourceFilter(), OggFLAC_1_0_Stream::OggFLAC_1_0_Stream(), OggMuxInputPin::OggMuxInputPin(), OggMuxStream::OggMuxStream(), OggPacket::OggPacket(), OggPaginator::OggPaginator(), OggStream::OggStream(), OggStreamValidationState::OggStreamValidationState(), OggValidationState::OggValidationState(), SingleMediaFileCache::SingleMediaFileCache(), SpeexDecodeInputPin::SpeexDecodeInputPin(), StreamCommentInfo::StreamCommentInfo(), TheoraDecodeFilter::TheoraDecodeFilter(), TheoraEncodeInputPin::TheoraEncodeInputPin(), and VorbisDecodeInputPin::VorbisDecodeInputPin().

#define true   1
 

Definition at line 57 of file ConvertUTF.c.

Referenced by CMMLSourcePin::CMMLSourcePin(), HTTPFileSource::HTTPFileSource(), NativeFLACSourceFilter::NativeFLACSourceFilter(), OggDemuxSourceFilter::OggDemuxSourceFilter(), OggDemuxSourcePin::OggDemuxSourcePin(), OggMuxStream::OggMuxStream(), OggPacketiser::OggPacketiser(), OggSeekTable::OggSeekTable(), OggStream::OggStream(), and TheoraDecoder::TheoraDecoder().

#define UNI_SUR_HIGH_END   (UTF32)0xDBFF
 

Definition at line 53 of file ConvertUTF.c.

#define UNI_SUR_HIGH_START   (UTF32)0xD800
 

Definition at line 52 of file ConvertUTF.c.

Referenced by ConvertUTF16toUTF32(), ConvertUTF16toUTF8(), ConvertUTF32toUTF16(), ConvertUTF32toUTF8(), ConvertUTF8toUTF16(), and ConvertUTF8toUTF32().

#define UNI_SUR_LOW_END   (UTF32)0xDFFF
 

Definition at line 55 of file ConvertUTF.c.

#define UNI_SUR_LOW_START   (UTF32)0xDC00
 

Definition at line 54 of file ConvertUTF.c.

Referenced by ConvertUTF16toUTF32(), and ConvertUTF16toUTF8().


Function Documentation

ConversionResult ConvertUTF16toUTF32 const UTF16 **  sourceStart,
const UTF16 sourceEnd,
UTF32 **  targetStart,
UTF32 targetEnd,
ConversionFlags  flags
 

Definition at line 110 of file ConvertUTF.c.

References ConversionResult, UNI_SUR_HIGH_START, UNI_SUR_LOW_START, UTF16, and UTF32.

ConversionResult ConvertUTF16toUTF8 const UTF16 **  sourceStart,
const UTF16 sourceEnd,
UTF8 **  targetStart,
UTF8 targetEnd,
ConversionFlags  flags
 

Definition at line 214 of file ConvertUTF.c.

References ConversionResult, firstByteMark, UNI_SUR_HIGH_START, UNI_SUR_LOW_START, UTF16, UTF32, and UTF8.

ConversionResult ConvertUTF32toUTF16 const UTF32 **  sourceStart,
const UTF32 sourceEnd,
UTF16 **  targetStart,
UTF16 targetEnd,
ConversionFlags  flags
 

Definition at line 61 of file ConvertUTF.c.

References ConversionResult, UNI_SUR_HIGH_START, UTF16, and UTF32.

ConversionResult ConvertUTF32toUTF8 const UTF32 **  sourceStart,
const UTF32 sourceEnd,
UTF8 **  targetStart,
UTF8 targetEnd,
ConversionFlags  flags
 

Definition at line 409 of file ConvertUTF.c.

References ConversionResult, firstByteMark, UNI_SUR_HIGH_START, UTF32, and UTF8.

ConversionResult ConvertUTF8toUTF16 const UTF8 **  sourceStart,
const UTF8 sourceEnd,
UTF16 **  targetStart,
UTF16 targetEnd,
ConversionFlags  flags
 

Definition at line 336 of file ConvertUTF.c.

References ConversionResult, isLegalUTF8(), offsetsFromUTF8, trailingBytesForUTF8, UNI_SUR_HIGH_START, UTF16, UTF32, and UTF8.

Here is the call graph for this function:

ConversionResult ConvertUTF8toUTF32 const UTF8 **  sourceStart,
const UTF8 sourceEnd,
UTF32 **  targetStart,
UTF32 targetEnd,
ConversionFlags  flags
 

Definition at line 462 of file ConvertUTF.c.

References ConversionResult, isLegalUTF8(), offsetsFromUTF8, trailingBytesForUTF8, UNI_SUR_HIGH_START, UTF32, and UTF8.

Here is the call graph for this function:

Boolean isLegalUTF8 const UTF8 source,
int  length
[static]
 

Definition at line 295 of file ConvertUTF.c.

References Boolean, and UTF8.

Referenced by ConvertUTF8toUTF16(), ConvertUTF8toUTF32(), and isLegalUTF8Sequence().

Boolean isLegalUTF8Sequence const UTF8 source,
const UTF8 sourceEnd
 

Definition at line 326 of file ConvertUTF.c.

References Boolean, isLegalUTF8(), trailingBytesForUTF8, and UTF8.

Here is the call graph for this function:


Variable Documentation

const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC } [static]
 

Definition at line 200 of file ConvertUTF.c.

Referenced by ConvertUTF16toUTF8(), and ConvertUTF32toUTF8().

const UTF32 halfBase = 0x0010000UL [static]
 

Definition at line 49 of file ConvertUTF.c.

const UTF32 halfMask = 0x3FFUL [static]
 

Definition at line 50 of file ConvertUTF.c.

const int halfShift = 10 [static]
 

Definition at line 47 of file ConvertUTF.c.

const UTF32 offsetsFromUTF8[6] [static]
 

Initial value:

 { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 
                     0x03C82080UL, 0xFA082080UL, 0x82082080UL }

Definition at line 190 of file ConvertUTF.c.

Referenced by ConvertUTF8toUTF16(), and ConvertUTF8toUTF32().

const char trailingBytesForUTF8[256] [static]
 

Initial value:

 {
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
}

Definition at line 174 of file ConvertUTF.c.

Referenced by ConvertUTF8toUTF16(), ConvertUTF8toUTF32(), and isLegalUTF8Sequence().


Generated on Tue Feb 15 14:56:04 2005 for oggdsf by  doxygen 1.3.9