From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-protocol and encoding Date: Thu, 16 Apr 2009 08:39:43 +0200 Message-ID: References: <87y6ue3sms.fsf@kassiopeya.MSHEIMNETZ> <8763hgbth5.fsf@kassiopeya.MSHEIMNETZ> <873ac9a763.fsf@kassiopeya.MSHEIMNETZ> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuMoZ-0008SL-Ee for emacs-orgmode@gnu.org; Thu, 16 Apr 2009 04:19:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuMoU-0008QU-Kz for emacs-orgmode@gnu.org; Thu, 16 Apr 2009 04:19:18 -0400 Received: from [199.232.76.173] (port=60700 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuMoU-0008QP-BU for emacs-orgmode@gnu.org; Thu, 16 Apr 2009 04:19:14 -0400 Received: from mail-ew0-f160.google.com ([209.85.219.160]:43220) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LuMoT-0000Wj-Q8 for emacs-orgmode@gnu.org; Thu, 16 Apr 2009 04:19:14 -0400 Received: by ewy4 with SMTP id 4so252306ewy.42 for ; Thu, 16 Apr 2009 01:19:12 -0700 (PDT) In-Reply-To: <873ac9a763.fsf@kassiopeya.MSHEIMNETZ> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastian Rose Cc: emacs-orgmode@gnu.org, Ulf Stegemann Hi Sebastian, this looks like a good solution! Send me a final patch when you are convinced yourself. Ulf, can you do some testing, please? Thanks. - Carsten On Apr 16, 2009, at 12:22 AM, Sebastian Rose wrote: > Hi Ulf and Carsten, > > > here appended is a patch, that does two things. > > > 1. Decode hex-encoded unicode > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > The new function `org-protocol-unhex-string' correctly decodes unicode > hex-enoded, just like the JavaScript function `encodeURIComponent' =20 > does. > > I tested with several unicode and german websites. > > This is text fetched per org-protocol.el after patching: > > =46rom the mew homepage (http://www.mew.org/index.html.ja): > > =3D> --->8----------------------------->8-----------------------------=20= > >8--- > Quelle: [2009-04-16 Do], [[http://www.mew.org/index.html.ja][Mew =E3=81=AE= =20 > =E3=82=AA=E3=83=95=E3=82=A3=E3=82=B7=E3=83=A3=E3=83=AB=E3=83=9A=E3=83=BC= =E3=82=B8]] > > Mew=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E8=B3=AA=E5=95=8F=E3=81=AFMew-di= st=E3=83=A1=E3=83=BC=E3=83=AA=E3=83=B3=E3=82=B0=E3=83=AA=E3=82=B9=E3=83=88= =E3=81=B8=E9=80=81=E3=81=A3=E3=81=A6=20 > =E3=81=8F=E3=81=A0=E3=81=95=E3=81=84=E3=80=82 > =E4=BD=9C=E8=80=85=E5=80=8B=E4=BA=BA=E5=AE=9B=E3=81=AB=E9=80=81=E3=81=A3= =E3=81=A6=E3=82=82=EF=BC=8C=E8=BF=94=E4=BA=8B=E3=81=AF=E6=88=BB=E3=81=A3=E3= =81=A6=E3=81=93=E3=81=AA=E3=81=84=E3=81=8B=E3=82=82=E3=81=97=20 > =E3=82=8C=E3=81=BE=E3=81=9B=E3=82=93=E3=80=82 > =E3=81=93=E3=81=AE=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=B8=E3=81=AE=E3=83=AA= =E3=83=B3=E3=82=AF=E3=80=81=E6=9B=B8=E7=B1=8D=E3=83=BB=E9=9B=91=E8=AA=8C=E7= =AD=89=E3=81=A7=E3=81=AE=E7=B4=B9=E4=BB=8B=E3=81=AF=E3=80=81 > =E5=85=AC=E5=BA=8F=E8=89=AF=E4=BF=97=E3=81=AB=E5=8F=8D=E3=81=97=E3=81=AA= =E3=81=84=E7=AF=84=E5=9B=B2=E3=81=A7=E8=87=AA=E7=94=B1=E3=81=AB=E3=81=A9=E3= =81=86=E3=81=9E=E3=80=82 > > <=3D =20 > ---8<-----------------------------8<-----------------------------8<--- > > > > > 2. Allow a function as second argument to org-protocol-split-data > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > The default decoding function is now `org-protocol-unhex-string', if =20= > the > second parameter to `org-protocol-split-data' is non-nil. If that > parameter is a function, that function is used to decode the split > parts. > > > > > > The patch still containes some lines with debugging code, that > may be uncommented to see what's going on. > > > > > > Best > > Sebastian > > >