#include <stdlib.h>#include <string.h>#include <errno.h>#include "libnjb.h"#include "protocol.h"#include "protocol3.h"#include "unicode.h"#include "njb_error.h"#include "usb_io.h"#include "ioutil.h"#include "defs.h"#include "base.h"Defines | |
| #define | MAX_STRING_LENGTH 512 |
Functions | |
| void | njb_set_unicode (int flag) |
| int | ucs2strlen (const unsigned char *unicstr) |
| char * | strtoutf8 (const unsigned char *str) |
| char * | utf8tostr (const unsigned char *str) |
| char * | ucs2tostr (const unsigned char *unicstr) |
| unsigned char * | strtoucs2 (const unsigned char *str) |
Variables | |
| int | __sub_depth |
| int | njb_unicode_flag = NJB_UC_8859 |
|
|
This flag determines whether to use ISO 8859-1 / codepage 1252 (default) or unicode UTF-8 for ALL strings sent into and out of libnjb, for ALL sessions and devices.
|
|
|
Convert a simple ISO 8859-1 or a Unicode UTF8 string (depending on library Unicode flag) to a unicode UCS-2 string.
|
|
|
This function converts an ordinary ISO 8859-1 string to a unicode UTF-8 string
|
|
|
Gets the length (in characters, not bytes) of a unicode UCS-2 string, eg a string which physically is 0x00 0x41 0x00 0x00 will return a value of 1.
|
|
|
Converts a Unicode UCS-2 2-byte string to a common ISO 8859-1 string quick and dirty (japanese unicodes etc, that use all 16 bits will fail miserably)
|
|
|
This function approximates an ISO 8859-1 string from a UTF-8 string, leaving out untranslatable characters
|
|
|
The current subroutine depth for all of libnjb (global) |
|
|
A flag for if unicode is used or not (global) |
1.4.4