For Programmers: Free Programming Magazines  


Home > Archive > Tcl > August 2007 > typing is ok but copy-paste does not encode









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author typing is ok but copy-paste does not encode
nick_meet@yahoo.gr

2007-08-13, 10:20 pm

similar topic =3D "Help! Unicode cut/paste on Unix"

OS =3D No problem is Windows XP , but in ubuntu 7.04
application =3D aMSN 0.97RC1
tcl/tk version =3D 8.5a6

The problem is not typing in gr, but pasting gr characters from
another program.
example:
If I select with mouse from terminal the gr word =CE=B3=CE=B5=CE=B9=CE=
=AC and paste the
text in the message window of aMSN , I get the following:
\u03b3\u03b5\u03b9\u03ac

This is my first message here , please ask me for additional
information.
I am a newbie and I apologies if the solution is somewhere that I
didn't see...

nick_meet@yahoo.gr

2007-08-13, 10:20 pm

A better definition of the problem:
copy-paste(Ctrl-v) UTF-8 characters to a tcl/tk application on a Unix-
like OS

The only sure , is that there is no official solution:
http://www.cl.cam.ac.uk/~mgk25/unicode.html#x11

Donal K. Fellows

2007-08-14, 7:10 pm

nick_m...@yahoo.gr wrote:
> copy-paste(Ctrl-v) UTF-8 characters to a tcl/tk application on a Unix-
> like OS
>
> The only sure , is that there is no official solution:http://www.cl.cam.ac.uk/~mgk25/unicode.html#x11


Well, yes and no. The solution that has been fairly widely adopted was
to define a new format for data transfer on Unix that sent the data as
utf-8. Tk supports that format, and has done since 8.4 (a fair few
years now). The problem only comes when the other end of the transfer
*doesn't* support the format and instead sends random 8-bit data in an
unknown encoding through the STRING type. There's not much Tk can do
in that case except guess, and it may well not guess right. (I don't
remember if it uses the system encoding or if it guesses ISO 8859-1.)
Working around bugs in other applications is a mug's game...

Donal.

nick_meet@yahoo.gr

2007-08-14, 10:10 pm

I am a newbie so I stop here.I informed the aMSN developers and I hope
they will understand what to do.

Thank you for your time!

nick_meet@yahoo.gr

2007-08-14, 10:10 pm

I am a newbie ,so I stop here.I informed the aMSN developers and I
hope they will understand what to do.

Thank you for your time!

nick_meet@yahoo.gr

2007-08-14, 10:10 pm



Andreas Leitgeb

2007-08-17, 8:11 am

Donal K. Fellows <donal.k.fellows@man.ac.uk> wrote:
> nick_m...@yahoo.gr wrote:
>
> unknown encoding through the STRING type. There's not much Tk can do
> in that case except guess, and it may well not guess right. (I don't
> remember if it uses the system encoding or if it guesses ISO 8859-1.)
> Working around bugs in other applications is a mug's game...


I don't think this is the right answer, since nick_meet wrote
that he got the string "\u03b3\u03b5\u03b9\u03ac", which looks
like the message has been correctly "understood" by aMSN, but
its displaying failed.
I wonder if each of these \u... things behave like single
characters, (which would indicate a font-problem) or if they
behaved like separate '' 'u' '0' characters... (which would
hint towards some explicit malakia happening in amsn)

nick_meet@yahoo.gr

2007-08-24, 8:10 am

Problem fixed in latest SVN version(r8963). They didn't save/retreive
data from the clipboard using UTF8 (undocumented). Thanks to dkf from
#tcl channel who pointed that out.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com