Experimental 3.5-1 VM and multilingual support
Ian Piumarta
ian.piumarta at inria.fr
Wed Mar 5 03:53:59 UTC 2003
On Tue, 4 Mar 2003, Ned Konz wrote:
> > Null characters can't be part of strings cut and pasted between
> > Squeak and Mac OS applications; the null and all subsequent
> > characters are lost. The reason is obvious, and I'm not sure that
> > it's actually a problem, but it's worth noting.
>
> How is the reason obvious? Don't they have a length associated with
> their strings?
Yes, they do.
I just modified the clipboard code trivially (removing a few NUL
terminator assumptions I'd stupidly put in there):
stringWithCString: -> stringWithCString:length:
CFStringCreateWithCString -> CFStringCreateWithBytes
strncpy -> memcpy
and now everything works fine with embedded NULs in the clipboard.
Cheers,
Ian
More information about the Squeak-dev
mailing list
|