AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
ntv2utf8.cpp File Reference

Implements the bare-bones UTF8 support functions (for the nub). More...

#include <string.h>
#include <stdio.h>
#include "ntv2utf8.h"
Include dependency graph for ntv2utf8.cpp:

Go to the source code of this file.

Functions

static int u8_seqlen (const char *s)
 
void strncpyasutf8 (char *dest, const char *src, int dest_buf_size)
 
bool map_utf8_to_codepage437 (const char *src, int u8_len, unsigned char *cp437equiv)
 
void strncpyasutf8_map_cp437 (char *dest, const char *src, int dest_buf_size)
 

Variables

static const char trailingBytesForUTF8 [256]
 

Detailed Description

Implements the bare-bones UTF8 support functions (for the nub).

Definition in file ntv2utf8.cpp.

Function Documentation

◆ map_utf8_to_codepage437()

bool map_utf8_to_codepage437 ( const char *  src,
int  u8_len,
unsigned char *  cp437equiv 
)

Definition at line 65 of file ntv2utf8.cpp.

◆ strncpyasutf8()

void strncpyasutf8 ( char *  dest,
const char *  src,
int  dest_buf_size 
)

Definition at line 33 of file ntv2utf8.cpp.

◆ strncpyasutf8_map_cp437()

void strncpyasutf8_map_cp437 ( char *  dest,
const char *  src,
int  dest_buf_size 
)

Definition at line 321 of file ntv2utf8.cpp.

◆ u8_seqlen()

static int u8_seqlen ( const char *  s)
static

Definition at line 26 of file ntv2utf8.cpp.

Variable Documentation

◆ trailingBytesForUTF8

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 14 of file ntv2utf8.cpp.