Apache2
apr_arch_utf8.h File Reference
#include "apr.h"
#include "apr_lib.h"
#include "apr_errno.h"
Include dependency graph for apr_arch_utf8.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define apr_conv_utf8_to_ucs2(in, inbytes, out, outwords)   apr_conv_utf8_to_utf16(in, inbytes, out, outwords)
 
#define apr_conv_ucs2_to_utf8(in, inwords, out, outbytes)   apr_conv_utf16_to_utf8(in, inwords, out, outbytes)
 

Typedefs

typedef apr_uint16_t apr_wchar_t
 

Functions

apr_status_t apr_conv_utf8_to_utf16 (const char *in, apr_size_t *inbytes, apr_wchar_t *out, apr_size_t *outwords)
 
apr_status_t apr_conv_utf16_to_utf8 (const apr_wchar_t *in, apr_size_t *inwords, char *out, apr_size_t *outbytes)
 

Macro Definition Documentation

◆ apr_conv_ucs2_to_utf8

#define apr_conv_ucs2_to_utf8 (   in,
  inwords,
  out,
  outbytes 
)    apr_conv_utf16_to_utf8(in, inwords, out, outbytes)

◆ apr_conv_utf8_to_ucs2

#define apr_conv_utf8_to_ucs2 (   in,
  inbytes,
  out,
  outwords 
)    apr_conv_utf8_to_utf16(in, inbytes, out, outwords)

Typedef Documentation

◆ apr_wchar_t

Function Documentation

◆ apr_conv_utf16_to_utf8()

apr_status_t apr_conv_utf16_to_utf8 ( const apr_wchar_t in,
apr_size_t inwords,
char *  out,
apr_size_t outbytes 
)

An APR internal function for fast utf-16 Unicode including surrogate pairs format conversion to the utf-8 octet-encoded Unicode. This function is used for filename and other resource conversions for platforms providing native Unicode support.

@tip Only the errors APR_EINVAL and APR_INCOMPLETE may occur, the former when the surrogate word is invalid (in or out of context) and the later when another surrogate word is expected, but insufficient words remain.

◆ apr_conv_utf8_to_utf16()

apr_status_t apr_conv_utf8_to_utf16 ( const char *  in,
apr_size_t inbytes,
apr_wchar_t out,
apr_size_t outwords 
)

An APR internal function for fast utf-8 octet-encoded Unicode conversion to the utf-16 Unicode with surrogate pairs format. This function is used for filename and other resource conversions for platforms providing native Unicode support.

@tip Only the errors APR_EINVAL and APR_INCOMPLETE may occur, the former when the character code is invalid (in or out of context) and the later when more characters were expected, but insufficient characters remain.