|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /usr/local/include/php/ext/mbstring/libmbfl/filters/ |
Upload File : |
#ifndef MBFL_UTF7_HELPER_H
#define MBFL_UTF7_HELPER_H
#include "mbfilter.h"
/* Ways which a Base64-encoded section can end: */
#define DASH 0xFC
#define DIRECT 0xFD
#define ASCII 0xFE
#define ILLEGAL 0xFF
static inline bool is_base64_end_valid(unsigned char n, bool gap, bool is_surrogate)
{
return !(gap || is_surrogate || n == ASCII || n == ILLEGAL);
}
static inline bool has_surrogate(uint16_t cp, bool is_surrogate)
{
return !is_surrogate && cp >= 0xD800 && cp <= 0xDBFF;
}
#endif /* MBFL_UTF7_HELPER_H */