Path: blob/master/thirdparty/linuxbsd_headers/pulse/utf8.h
9905 views
#ifndef fooutf8hfoo1#define fooutf8hfoo23/***4This file is part of PulseAudio.56Copyright 2006 Lennart Poettering7Copyright 2006 Pierre Ossman <[email protected]> for Cendio AB89PulseAudio is free software; you can redistribute it and/or modify10it under the terms of the GNU Lesser General Public License as11published by the Free Software Foundation; either version 2.1 of the12License, or (at your option) any later version.1314PulseAudio is distributed in the hope that it will be useful, but15WITHOUT ANY WARRANTY; without even the implied warranty of16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU17Lesser General Public License for more details.1819You should have received a copy of the GNU Lesser General Public20License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.21***/2223#include <pulse/cdecl.h>24#include <pulse/gccmacro.h>25#include <pulse/version.h>2627/** \file28* UTF-8 validation functions29*/3031PA_C_DECL_BEGIN3233/** Test if the specified strings qualifies as valid UTF8. Return the string if so, otherwise NULL */34char *pa_utf8_valid(const char *str) PA_GCC_PURE;3536/** Test if the specified strings qualifies as valid 7-bit ASCII. Return the string if so, otherwise NULL. \since 0.9.15 */37char *pa_ascii_valid(const char *str) PA_GCC_PURE;3839/** Filter all invalid UTF8 characters from the specified string, returning a new fully UTF8 valid string. Don't forget to free the returned string with pa_xfree() */40char *pa_utf8_filter(const char *str);4142/** Filter all invalid ASCII characters from the specified string, returning a new fully ASCII valid string. Don't forget to free the returned string with pa_xfree(). \since 0.9.15 */43char *pa_ascii_filter(const char *str);4445/** Convert a UTF-8 string to the current locale. Free the string using pa_xfree(). */46char* pa_utf8_to_locale (const char *str);4748/** Convert a string in the current locale to UTF-8. Free the string using pa_xfree(). */49char* pa_locale_to_utf8 (const char *str);5051PA_C_DECL_END5253#endif545556