#include <v8.h>
#include <node.h>
#include <node_version.h>
#include <node_buffer.h>
#include <node_object_wrap.h>
#include <stdlib.h>
#include <wchar.h>
#include <stdio.h>
#include "nan.h"
Go to the source code of this file.
Classes | |
class | Validation |
Defines | |
#define | UNI_MAX_LEGAL_UTF32 (uint32_t) 0x0010FFFF |
#define | UNI_REPLACEMENT_CHAR (uint32_t) 0x0000FFFD |
#define | UNI_SUR_HIGH_START (uint32_t) 0xD800 |
#define | UNI_SUR_LOW_END (uint32_t) 0xDFFF |
Functions | |
void | init (Handle< Object > target) |
int | is_valid_utf8 (size_t len, char *value) |
static int | isLegalUTF8 (const uint8_t *source, const int length) |
Variables | |
static const uint32_t | offsetsFromUTF8 [6] |
static const uint8_t | trailingBytesForUTF8 [256] |
#define UNI_MAX_LEGAL_UTF32 (uint32_t) 0x0010FFFF |
Definition at line 24 of file validation.cc.
#define UNI_REPLACEMENT_CHAR (uint32_t) 0x0000FFFD |
Definition at line 23 of file validation.cc.
#define UNI_SUR_HIGH_START (uint32_t) 0xD800 |
Definition at line 21 of file validation.cc.
#define UNI_SUR_LOW_END (uint32_t) 0xDFFF |
Definition at line 22 of file validation.cc.
void init | ( | Handle< Object > | target | ) |
Definition at line 142 of file validation.cc.
int is_valid_utf8 | ( | size_t | len, |
char * | value | ||
) |
Definition at line 70 of file validation.cc.
static int isLegalUTF8 | ( | const uint8_t * | source, |
const int | length | ||
) | [static] |
Definition at line 42 of file validation.cc.
const uint32_t offsetsFromUTF8[6] [static] |
{ 0x00000000, 0x00003080, 0x000E2080, 0x03C82080, 0xFA082080, 0x82082080 }
Definition at line 37 of file validation.cc.
const uint8_t trailingBytesForUTF8[256] [static] |
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,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 26 of file validation.cc.