1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

bug 153: Convert titles in bookmark manager from UTF-8.

This commit is contained in:
Kalle Olavi Niemitalo 2008-11-17 09:19:12 +02:00 committed by Kalle Olavi Niemitalo
parent b3f9d48bba
commit b3acd2a5bc

View File

@ -56,9 +56,16 @@ static unsigned char *
get_bookmark_text(struct listbox_item *item, struct terminal *term) get_bookmark_text(struct listbox_item *item, struct terminal *term)
{ {
struct bookmark *bookmark = item->udata; struct bookmark *bookmark = item->udata;
int utf8_cp = get_cp_index("UTF-8");
int term_cp = get_terminal_codepage(term);
struct conv_table *convert_table;
/** @todo Bug 153: bookmark->title should be UTF-8 */ convert_table = get_translation_table(utf8_cp, term_cp);
return stracpy(bookmark->title); if (!convert_table) return NULL;
return convert_string(convert_table,
bookmark->title, strlen(bookmark->title),
term_cp, CSM_NONE, NULL, NULL, NULL);
} }
static unsigned char * static unsigned char *