23#ifndef MUTT_MUTT_MBYTE_H
24#define MUTT_MUTT_MBYTE_H
37#define IsPrint(ch) (isprint((unsigned char) (ch)) || ((unsigned char) (ch) >= 0xa0))
38#define IsWPrint(wc) (iswprint(wc) || wc >= 0xa0)
40#define IsPrint(ch) (isprint((unsigned char) (ch)) || (OptLocales ? 0 : ((unsigned char) (ch) >= 0xa0)))
41#define IsWPrint(wc) (iswprint(wc) || (OptLocales ? 0 : (wc >= 0xa0)))
43#define IsBOM(wc) (wc == L'\xfeff')
51size_t mutt_mb_mbstowcs(
wchar_t **pwbuf,
size_t *pwbuflen,
size_t i,
const char *buf);
int mutt_mb_charlen(const char *s, int *width)
Count the bytes in a (multibyte) character.
bool mutt_mb_is_shell_char(wchar_t ch)
Is character not typically part of a pathname.
int mutt_mb_filter_unprintable(char **s)
Replace unprintable characters.
size_t mutt_mb_width_ceiling(const wchar_t *s, size_t n, int w1)
Keep the end of the string on-screen.
bool OptLocales
(pseudo) set if user has valid locale definition
bool mutt_mb_get_initials(const char *name, char *buf, size_t buflen)
Turn a name into initials.
bool mutt_mb_is_display_corrupting_utf8(wchar_t wc)
Will this character corrupt the display?
size_t mutt_mb_mbstowcs(wchar_t **pwbuf, size_t *pwbuflen, size_t i, const char *buf)
Convert a string from multibyte to wide characters.
int mutt_mb_wcswidth(const wchar_t *s, size_t n)
Measure the screen width of a string.
bool mutt_mb_is_lower(const char *s)
Does a multi-byte string contain only lowercase characters?
int mutt_mb_width(const char *str, int col, bool indent)
Measure a string's display width (in screen columns)
void buf_mb_wcstombs(struct Buffer *dest, const wchar_t *wstr, size_t wlen)
Convert a string from wide to multibyte characters.
int mutt_mb_wcwidth(wchar_t wc)
Measure the screen width of a character.
String manipulation buffer.