Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3995382
utils.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 7, 6:23 AM
Size
760 B
Mime Type
text/x-c
Expires
Thu, Jul 9, 6:23 AM (14 h, 31 m)
Engine
blob
Format
Raw Data
Handle
271336
Attached To
rXR Xreate
utils.cpp
View Options
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* utils.cpp
*
* Author: pgess <v.melnychenko@xreate.org>
*/
#include "utils.h"
#include <boost/locale/encoding_utf.hpp>
using namespace xreate;
Config Config::__self = Config();
Config::Config()
: __storage{json_file{ "config/default.json" }}
{}
using boost::locale::conv::utf_to_utf;
std::wstring
utf8_to_wstring(const std::string& str)
{
return utf_to_utf<wchar_t>(str.c_str(), str.c_str() + str.size());
}
std::string
wstring_to_utf8(const std::wstring& str)
{
return utf_to_utf<char>(str.c_str(), str.c_str() + str.size());
}
Event Timeline
Log In to Comment