Commit 577d3f3f authored by Julien Wadel's avatar Julien Wadel
Browse files

Fix : when building vcard from DB, convert locale to UTF8 for belcard as...

Fix : when building vcard from DB, convert locale to UTF8 for belcard as sqlite3_exec return Locale in callbacks
parent 074665b9
......@@ -1475,7 +1475,11 @@ static int create_friend(void *data, int argc, char **argv, char **colName) {
LinphoneVcard *vcard = NULL;
unsigned int storage_id = (unsigned int)atoi(argv[0]);
vcard = linphone_vcard_context_get_vcard_from_buffer(context, argv[6]);
//sqlite3_exec return a Locale string and Belcard need to be in UTF8 for parsing
string localeBuffer(argv[6]);
string utf8Buffer = LinphonePrivate::Utils::localeToUtf8(localeBuffer);
vcard = linphone_vcard_context_get_vcard_from_buffer(context, utf8Buffer.c_str());
if (vcard) {
linphone_vcard_set_etag(vcard, argv[7]);
linphone_vcard_set_url(vcard, argv[8]);
......
......@@ -24,6 +24,7 @@
#include "linphone/factory.h"
#include "linphone/wrapper_utils.h"
#include "linphone/utils/utils.h"
#include "c-wrapper/c-wrapper.h"
#include "c-wrapper/internal/c-sal.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment