The Sleuth Kit  4.3
Macros | Typedefs | Functions
tsk_unicode.c File Reference

A local copy of the Unicode conversion routines from unicode.org. More...

#include "tsk_base_i.h"

Macros

#define false   0
 
#define true   1
 
#define TSK_UNI_MAX_BMP   (UTF32)0x0000FFFF
 
#define TSK_UNI_MAX_LEGAL_UTF32   (UTF32)0x0010FFFF
 
#define TSK_UNI_MAX_UTF16   (UTF32)0x0010FFFF
 
#define TSK_UNI_MAX_UTF32   (UTF32)0x7FFFFFFF
 
#define TSK_UNI_REPLACEMENT_CHAR   (UTF32)0x0000FFFD
 
#define UNI_SUR_HIGH_END   (UTF32)0xDBFF
 
#define UNI_SUR_HIGH_START   (UTF32)0xD800
 
#define UNI_SUR_LOW_END   (UTF32)0xDFFF
 
#define UNI_SUR_LOW_START   (UTF32)0xDC00
 

Typedefs

typedef unsigned long UTF32
 

Functions

void tsk_cleanupUTF8 (char *source, const char replacement)
 Cleans up the passed in string to replace invalid UTF-8 values with the passed in character. More...
 
Boolean tsk_isLegalUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd)
 
TSKConversionResult tsk_UTF16toUTF8 (TSK_ENDIAN_ENUM endian, const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, TSKConversionFlags flags)
 Convert a UTF-16 string to UTF-8. More...
 
TSKConversionResult tsk_UTF16toUTF8_lclorder (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, TSKConversionFlags flags)
 Convert a UTF-16 string in local endian ordering to UTF-8. More...
 
TSKConversionResult tsk_UTF16WtoUTF8_lclorder (const wchar_t **sourceStart, const wchar_t *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, TSKConversionFlags flags)
 
TSKConversionResult tsk_UTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, TSKConversionFlags flags)
 Convert a UTF-8 string to UTF-16 (in local endian ordering). More...
 
TSKConversionResult tsk_UTF8toUTF16W (const UTF8 **sourceStart, const UTF8 *sourceEnd, wchar_t **targetStart, wchar_t *targetEnd, TSKConversionFlags flags)
 

Detailed Description

A local copy of the Unicode conversion routines from unicode.org.

Function Documentation

void tsk_cleanupUTF8 ( char *  source,
const char  replacement 
)

Cleans up the passed in string to replace invalid UTF-8 values with the passed in character.

Parameters
sourceString to be cleaned up
replacementCharacter to insert into source as needed.

Copyright © 2007-2015 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.