2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 * Convert UTF-16 to UTF-8 strings
21 * Windows specific method to avoid initialization issues
22 * and locking issues that are unique to Windows as API calls
23 * expect UTF-16 strings
24 * \param str[in] string to be converted
25 * \param length[in] length in characters of the string
26 * \returns utf8 string, empty string on failure
28 std::string
FromW(const wchar_t* str
, size_t length
);
31 * Convert UTF-16 to UTF-8 strings
32 * Windows specific method to avoid initialization issues
33 * and locking issues that are unique to Windows as API calls
34 * expect UTF-16 strings
35 * \param str[in] string to be converted
36 * \returns utf8 string, empty string on failure
38 std::string
FromW(const std::wstring
& str
);
41 * Convert UTF-8 to UTF-16 strings
42 * Windows specific method to avoid initialization issues
43 * and locking issues that are unique to Windows as API calls
44 * expect UTF-16 strings
45 * \param str[in] string to be converted
46 * \param length[in] length in characters of the string
47 * \returns UTF-16 string, empty string on failure
49 std::wstring
ToW(const char* str
, size_t length
);
52 * Convert UTF-8 to UTF-16 strings
53 * Windows specific method to avoid initialization issues
54 * and locking issues that are unique to Windows as API calls
55 * expect UTF-16 strings
56 * \param str[in] string to be converted
57 * \returns UTF-16 string, empty string on failure
59 std::wstring
ToW(const std::string
& str
);