diff options
Diffstat (limited to 'amiga/clipboard.c')
-rwxr-xr-x | amiga/clipboard.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/amiga/clipboard.c b/amiga/clipboard.c index a8122f1bd..ee9e692f5 100755 --- a/amiga/clipboard.c +++ b/amiga/clipboard.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2010 Chris Young <chris@unsatisfactorysoftware.co.uk> + * Copyright 2008-2011 Chris Young <chris@unsatisfactorysoftware.co.uk> * * This file is part of NetSurf, http://www.netsurf-browser.org/ * @@ -42,6 +42,7 @@ #include <datatypes/pictureclass.h> struct IFFHandle *iffh = NULL; +bool ami_utf8_clipboard = false; // force UTF-8 in clipboard bool ami_add_to_clipboard(const char *text, size_t length, bool space); static bool ami_copy_selection(const char *text, size_t length, @@ -166,7 +167,7 @@ bool gui_empty_clipboard(void) { if(!(PushChunk(iffh,ID_FTXT,ID_FORM,IFFSIZE_UNKNOWN))) { - if(option_utf8_clipboard) + if(option_utf8_clipboard || ami_utf8_clipboard) { if(!(PushChunk(iffh,0,ID_CSET,24))) { @@ -215,7 +216,7 @@ bool ami_add_to_clipboard(const char *text, size_t length, bool space) { char *buffer; - if(option_utf8_clipboard) + if(option_utf8_clipboard || ami_utf8_clipboard) { WriteChunkBytes(iffh,text,length); } @@ -346,6 +347,8 @@ void ami_drag_selection(struct selection *s) if(text_box = ami_text_box_at_point(gwin, &x, &y)) { + ami_utf8_clipboard = true; + iffh = ami_clipboard_init_internal(1); if(gui_copy_to_clipboard(s)) @@ -356,6 +359,7 @@ void ami_drag_selection(struct selection *s) ami_clipboard_free_internal(iffh); iffh = old_iffh; + ami_utf8_clipboard = false; } else { |