[BUG][VM][UNIX][Mac OS X] clipboard can't handle unicode text?
Ned Konz
ned at squeakland.org
Tue Feb 8 14:15:41 UTC 2005
On Monday 07 February 2005 1:44 pm, Avi Bryant wrote:
> I just found an interesting crashing bug on OS X, using
> Squeak-3.6-3.app. There are probably lots of ways to replicate it,
> but this is how I happened to find it:
>
> - open a Squeak image (tested on a 3.6 era image)
> - go to http://www.shmoo.com/idn/ in Safari. This is a demo of an
> exploit possible by using unicode characters in domain names to spoof
> well known sites.
> - click on the "paypal.com" link and copy the text in the URL bar
> - go to Squeak, select any text, and copy
>
> Squeak crashes for me with the message:
> <NSCharacterConversionException> Conversion to encoding 30 failed for
> string "https://www.p_ypal.com/" (I inserted a _ in there to show that
> there's a funny char there in Terminal, but which would show up as an
> "a" in some email clients).
Using the 3.6g-3 Unix VM in Linux, and a 3.8 image, FWIW:
With the default -textenc setting (ISO8859-1):
Pasting results in a '\u0430' for that character (that is, 6 characters appear
for the one Unicode 0x0430 character).
The string looks like this when pasted into a Workspace:
http://www.p\u0430ypal.com
With -textenc UTF-8 (which is allegedly the default for Mac OS X) I get this:
http://www.p?ypal.com/
In other words, the character gets translated into a question mark.
In both cases, I can copy the text OK, of course.
The link text is: http://www.pаypal.com/
So anyhow, on the Unix VMs that use iconv it seems to work (well, it doesn't
crash, anyway).
--
Ned Konz
http://bike-nomad.com/squeak/
More information about the Squeak-dev
mailing list
|