Any idea how to get this optional parameter from the selection owner? Is
there a library (other than Qt) that can decode it back?
Thanks,
Gregory.

-----Original Message-----
From: Lars Knoll [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 13, 2002 2:34 PM
To: Kovriga, Gregory
Cc: '[EMAIL PROTECTED]'
Subject: Re: Drag&Drop internationalized text/uri-list



> Thanks,
> But this seems to be a bit more complicated:
> 1. Gnome doesn't perform the URL encoding (Nautilus sends plain text...) -
> KDE does... how should I know other then try both decoded and plain
> version?

That's a bit unfortunate, and IMO a bug in Nautilus (or Gnome). From the
specs 
(RFC 2483):
     "2) The remaining non-comment lines shall be URIs (URNs or URLs),
       encoded according to the URL or URN specifications (RFC2141,
       RFC1738 and RFC2396). Each URI shall appear on one and only one
       line"

They clearly say "encoded".

> 2. When KDE encoded some Hungarian characters it used 2 octet
> encoding for 1 non-Latin character, that is some e' (some hungarian
letter)
> was encoded into smth like %C3%A9. I didn't test it with Hebrew though -
> did you? Is it the same story? And how does it happen to encode it into 1
> character into 2 octets?

I guess this is due to the fact, that KDE uses utf8 as character encoding
for 
the URL. So the URL get's first converted to utf8, and then non ascii chars 
get converted to octets. The text/uri-list mimetype can have an optional 
charset parameter, and I guess that one should be set to utf8 in this case.

Cheers,
Lars

>
> Thanks in advance,
> Gregory.
>
> -----Original Message-----
> From: Ilya Konstantinov [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 10:16 PM
> To: Kovriga, Gregory
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: Drag&Drop internationalized text/uri-list
>
> On Mon, 2002-08-12 at 12:55, Kovriga, Gregory wrote:
> > Hi,
> > could anyone drop some light on the following issue:
> > when drag&dropping file using XDND the files are passed using
> > "text/uri-list" encoding. This seems to mean that non-ascii? other then
>
> en?
>
> > characters are converted to %XX%XX notations...
> > Does anybody know how exactly this is done and how exactly could this
> > name then be converted back to original file name?
>
> One or more URIs contained in the "text/uri-list" data have their
> non-Latin-1 characters encoded in the standard URL encoding, where every
> octet which doesn't fall into the Latin-1 range is substituted by a
> percent sign and its (octet's) hex value. Thus, you see multiple %XXs
> for non-English letters.
>
> Since for the OS, filenames are merely sequences of octets, the charset
> of the URI isn't specified by the standard. As far as you are concerned,
> the URI contains a string of octets, not text.
>
> Converting to original filename is easy -- simply scan and convert all
> %XXs to octets.
>
>
>
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
>
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to