From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id C069EBC57 for ; Tue, 8 Jun 2010 18:52:49 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AggCANMRDkxKfVK0kGdsb2JhbACeOAgVAQEBAQkJDAcRAx+vCYIChT4uiE8BAQMFhREE X-IronPort-AV: E=Sophos;i="4.53,385,1272837600"; d="scan'208";a="52688999" Received: from mail-wy0-f180.google.com ([74.125.82.180]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Jun 2010 18:52:49 +0200 Received: by wyb34 with SMTP id 34so3928933wyb.39 for ; Tue, 08 Jun 2010 09:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=fxnb4nN7onc1vxXrH5dQHalGVIGaKFVPC3agCXhhoYA=; b=kStMIRkx1C1UBeXlimdqclTLMsdtsQOqq+L6xpLLRr9hEItn6fVOOHrJDBMfSCJUIa zb7Jh78H79kTiePbweJEMfNc0sD1ji5xxb64gsULlWTSJN64vJGMJonW6l+L0iltrvXt QfsvH9LRKtgPJYCDwyQjMXr6EiiQCEROP1hvE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kC7zC7SlQ84dotUQ36xMGdrkzC/wbSE9N5wFfUwfX9XKq+x+TBZmVqcMj/P9Ct/51Q MmnrNVQKK8J5rpgVI9odYGhkeOx+HFuoCkgeFJWnCjrB3qgN+oY/MSDHhnq9btXagrtB grp8qx9gu13BlEtejjCZAXKZwwA04nbkCoaTY= MIME-Version: 1.0 Received: by 10.216.87.143 with SMTP id y15mr3691065wee.104.1276015966724; Tue, 08 Jun 2010 09:52:46 -0700 (PDT) Received: by 10.216.70.206 with HTTP; Tue, 8 Jun 2010 09:52:46 -0700 (PDT) In-Reply-To: <4C0E6561.20207@inescporto.pt> References: <4C0E6561.20207@inescporto.pt> Date: Tue, 8 Jun 2010 12:52:46 -0400 Message-ID: Subject: Re: [Caml-list] Escaped string in sexplib From: Markus Mottl To: Hugo Ferreira Cc: caml-list Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; markus:01 mottl:01 markus:01 mottl:01 pointers:01 ocaml:01 ocaml:01 wrote:01 parsing:01 caml-list:01 strings:01 strings:01 conventions:02 data:02 data:02 On Tue, Jun 8, 2010 at 11:44, Hugo Ferreira wrote: > I am trying to us the Sexplib library to process data. > However I am having some trouble with strings. > Specifically I need to save and restore strings to a file > so that the escaping done during saving is "undone" > when data is read back in. > > How can I do this? Appreciate any pointers. The I/O and parsing routines in the S-expression library should take care of escaped strings just fine. Btw., the escaping conventions are absolutely identical to the ones used by OCaml. Regards, Markus -- Markus Mottl http://www.ocaml.info markus.mottl@gmail.com