From 9f9436bf40609d1b0a334683729d9513b27b0862 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 30 Apr 2011 11:11:34 +0000 Subject: Ensure drags to string gadgets are in local charset svn path=/trunk/netsurf/; revision=12262 --- amiga/clipboard.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'amiga/clipboard.c') diff --git a/amiga/clipboard.c b/amiga/clipboard.c index 314692731..a8122f1bd 100755 --- a/amiga/clipboard.c +++ b/amiga/clipboard.c @@ -330,6 +330,7 @@ void ami_drag_selection(struct selection *s) struct box *text_box; int x; int y; + char *utf8text; struct ami_text_selection *sel; struct IFFHandle *old_iffh = iffh; struct gui_window_2 *gwin = ami_window_at_pointer(); @@ -365,18 +366,22 @@ void ami_drag_selection(struct selection *s) { if(sel = ami_selection_to_text(gwin)) { + utf8text = ami_utf8_easy(sel->text); RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_URL], - gwin->win, NULL, STRINGA_TextVal, sel->text, TAG_DONE); + gwin->win, NULL, STRINGA_TextVal, utf8text, TAG_DONE); FreeVec(sel); + ami_utf8_free(utf8text); } } else if(ami_gadget_hit(gwin->objects[GID_SEARCHSTRING], x, y)) { if(sel = ami_selection_to_text(gwin)) { + utf8text = ami_utf8_easy(sel->text); RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_SEARCHSTRING], - gwin->win, NULL, STRINGA_TextVal, sel->text, TAG_DONE); + gwin->win, NULL, STRINGA_TextVal, utf8text, TAG_DONE); FreeVec(sel); + ami_utf8_free(utf8text); } } else -- cgit v1.2.3