Index: tkMacOSXClipboard.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/macosx/tkMacOSXClipboard.c,v
retrieving revision 1.3
diff -r1.3 tkMacOSXClipboard.c
22a23
> 
75c76,102
<         
---
> 	
> 	/*+jas: try UNICODE first*/
>         err=GetScrapFlavorSize(scrapRef,kScrapFlavorTypeUnicode,&length);
>         if (err == noErr && length > 0) {
> 	  char *data;
> 	  Tcl_DString ds;
> 	  buf = (char *) ckalloc(length + 2);
> 	  buf[length] = 0;
> 	  buf[length+1] = 0; /*2-byte unicode null*/
> 	  err=GetScrapFlavorData(scrapRef,kScrapFlavorTypeUnicode,&length,buf);
> 	  if (err == noErr) {
> 	    Tcl_DStringInit(&ds);
> 	    Tcl_UniCharToUtfDString((Tcl_UniChar *)buf,
> 				    Tcl_UniCharLen((Tcl_UniChar *)buf), &ds);
>             for (data = Tcl_DStringValue(&ds); *data != '\0'; data++) {
>                 if (*data == '\r') {
>                     *data = '\n';
>                 }
>             }
> 	    result = (*proc)(clientData, interp, Tcl_DStringValue(&ds));
> 	    Tcl_DStringFree(&ds);
>             ckfree(buf);
>             return result;
> 	  }
> 	}
>         /*-jas*/
> 
315a343,351
> 	/*+jas: also put unicode data on scrap*/
> 	{
> 	  Tcl_DString unicodedText;	  
> 	  Tcl_DStringInit(&unicodedText);
> 	  Tcl_UtfToUniCharDString(buffer, length, &unicodedText);
> 	  PutScrapFlavor(scrapRef, kScrapFlavorTypeUnicode, 0, Tcl_DStringLength(&unicodedText), Tcl_DStringValue(&unicodedText));
> 	  Tcl_DStringFree(&unicodedText);
> 	}
> 	/*-jas*/
