Blender
V3.3
|
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
Go to the source code of this file.
Macros | |
#define | UTF_ERROR_NULL_IN (1 << 0) |
#define | UTF_ERROR_ILLCHAR (1 << 1) |
#define | UTF_ERROR_SMALL (1 << 2) |
#define | UTF_ERROR_ILLSEQ (1 << 3) |
#define | UTF16_ENCODE(in8str) |
#define | UTF16_UN_ENCODE(in8str) |
Functions | |
size_t | count_utf_8_from_16 (const wchar_t *string16) |
size_t | count_utf_16_from_8 (const char *string8) |
int | conv_utf_16_to_8 (const wchar_t *in16, char *out8, size_t size8) |
int | conv_utf_8_to_16 (const char *in8, wchar_t *out16, size_t size16) |
char * | alloc_utf_8_from_16 (const wchar_t *in16, size_t add) |
wchar_t * | alloc_utf16_from_8 (const char *in8, size_t add) |
#define UTF16_ENCODE | ( | in8str | ) |
#define UTF_ERROR_ILLCHAR (1 << 1) |
#define UTF_ERROR_ILLSEQ (1 << 3) |
#define UTF_ERROR_NULL_IN (1 << 0) |
#define UTF_ERROR_SMALL (1 << 2) |
wchar_t* alloc_utf16_from_8 | ( | const char * | in8, |
size_t | add | ||
) |
Allocates and converts the utf-16 string from utf-8
in8 | utf-8 string to convert |
add | any additional size which will be allocated for new utf-16 string in wchar_t (two bytes) |
Definition at line 291 of file utfconv.c.
References blender::bke::attribute_accessor_functions::add(), conv_utf_8_to_16(), count_utf_16_from_8(), and NULL.
Referenced by BLI_exists(), BLI_getenv(), GHOST_WindowWin32::GHOST_WindowWin32(), IFileStream::IFileStream(), imb_save_dds(), imb_savetiff(), OFileStream::OFileStream(), GHOST_WindowWin32::setTitle(), and GHOST_SystemWin32::showMessageBox().
char* alloc_utf_8_from_16 | ( | const wchar_t * | in16, |
size_t | add | ||
) |
Allocates and converts the utf-8 string from utf-16
in16 | utf-16 string to convert |
add | any additional size which will be allocated for new utf-8 string in bytes |
Definition at line 279 of file utfconv.c.
References blender::bke::attribute_accessor_functions::add(), conv_utf_16_to_8(), count_utf_8_from_16(), and NULL.
Referenced by BLI_getenv(), GHOST_SystemWin32::getClipboard(), main(), and u_alloc_getenv().
int conv_utf_16_to_8 | ( | const wchar_t * | in16, |
char * | out8, | ||
size_t | size8 | ||
) |
Converts utf-16 string to allocated utf-8 string
in16 | utf-16 string to convert |
out8 | utf-8 string to string the conversion |
size8 | the allocated size in bytes of out8 |
Definition at line 115 of file utfconv.c.
References err, u2, UTF_ERROR_ILLCHAR, UTF_ERROR_NULL_IN, and UTF_ERROR_SMALL.
Referenced by alloc_utf_8_from_16(), BLI_file_alias_target(), get_thumb_dir(), GHOST_SystemPathsWin32::getBinaryDir(), GHOST_SystemPathsWin32::getSystemDir(), GHOST_WindowWin32::getTitle(), GHOST_SystemPathsWin32::getUserDir(), GHOST_SystemPathsWin32::getUserSpecialDir(), GHOST_SystemWin32::processKeyEvent(), uput_getenv(), and where_am_i().
int conv_utf_8_to_16 | ( | const char * | in8, |
wchar_t * | out16, | ||
size_t | size16 | ||
) |
Converts utf-8 string to allocated utf-16 string
in8 | utf-8 string to convert |
out16 | utf-16 string to string the conversion |
size16 | the allocated size in wchar_t (two byte) of out16 |
Definition at line 181 of file utfconv.c.
References err, type, UTF_ERROR_ILLCHAR, UTF_ERROR_ILLSEQ, UTF_ERROR_NULL_IN, and UTF_ERROR_SMALL.
Referenced by alloc_utf16_from_8(), BLI_file_alias_target(), BLI_file_attributes(), BLI_strncpy_wchar_from_utf8(), and GHOST_SystemWin32::putClipboard().
size_t count_utf_16_from_8 | ( | const char * | string8 | ) |
Counts how many wchar_t (two byte) is required for future utf-16 string using utf-8
string8 | pointer to working utf-8 string |
Definition at line 57 of file utfconv.c.
Referenced by alloc_utf16_from_8(), and GHOST_SystemWin32::putClipboard().
size_t count_utf_8_from_16 | ( | const wchar_t * | string16 | ) |
Counts how many bytes is required for future utf-8 string using utf-16
string16 | pointer to working utf-16 string |
Definition at line 10 of file utfconv.c.
References count.
Referenced by alloc_utf_8_from_16(), and GHOST_WindowWin32::getTitle().