[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil
From: |
Sebastian Rose |
Subject: |
Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil) |
Date: |
Sun, 26 Sep 2010 23:23:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>>The binary representation of 127 is 0111 1111 and valid ascii char. DEL
>>actually (sh$ man ascii)
>
> Right, and that's why it is encoded: No control characters in a URI.
Great ! :)
> The final algorithm for the shiny new unicode aware percent encoding
> function would be:
>
> - percent encode all characters in TABLE
> - percent encode all characters below 32 and above 126
> - encode the char in utf-8
> - percent escape all bytes of the encoded char
>
> The remaining problem is keeping backward compatibility. There are Org
> files out there where "á" is encoded as "%E1" and not "%C3A1". The
> percent decoding function should be able to recognize these old
> escapes and return the right value.
>
> I looks like this could be done by changing the behavior of
> `org-protocol-unhex-string'. Currently it returns the empty string
> for "%E1" because it does not represent a valid utf-8 encoded unicode
> char. Maybe we could say: If the percent encoded sequence does not
> form a valid char, use the old method (extended ASCII?) to decode the
> sequences.
Well, yes. The function _should_ return something if the end of the
string is reached or something else but a `%' is found.
I'll have to find out where the function has to look up the correct
char. 167 will be a different character for different encodings.
This will not handle cases like `Größe' though.
Are there cases where strings are encoded the way you showed above, and
decoded using `org-unhex-string'?
Sebastian
- [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), Sébastien Vauban, 2010/09/20
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), David Maus, 2010/09/20
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), Sebastian Rose, 2010/09/20
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), David Maus, 2010/09/22
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), Sebastian Rose, 2010/09/22
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), David Maus, 2010/09/23
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), Sebastian Rose, 2010/09/23
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), David Maus, 2010/09/26
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil),
Sebastian Rose <=
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), Sebastian Rose, 2010/09/26
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), Sebastian Rose, 2010/09/26
- Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), Sebastian Rose, 2010/09/26
- [PATCH] Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), David Maus, 2010/09/27
- Re: [PATCH] Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), Sebastian Rose, 2010/09/27
- Re: [PATCH] Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil), Carsten Dominik, 2010/09/29
- [Orgmode] [PATCH] Decode single byte sequence if decoding unicode failed., David Maus, 2010/09/27
[Orgmode] Re: [bug] org-link-escape and (wrong-type-argument stringp nil), Sébastien Vauban, 2010/09/20