A funny thing is that octal or hexadecimal escapes are not part of EDN
(even if most readers recognize them).

On Wed, Mar 29, 2017 at 8:49 PM, Brian Craft <craft.br...@gmail.com> wrote:

> A funny hole in the meta-programming story. I don't think the String or
> Character classes have methods that do this.
>
> Also interesting, clojure's print methods will handle some escapes, but
> not others:
>
> cavm.core=> (println (pr-str "foo\tbar"))
>
> "foo\tbar"
>
> nil
>
> cavm.core=> (println (pr-str "foo\001bar"))
>
> "foobar"
>
> nil
>
>
> Apparently org.apache.commons.lang3.StringEscapeUtils.escapeJava is one
> solution.
>
>
> On Wednesday, March 29, 2017 at 11:02:40 AM UTC-7, Alex Miller wrote:
>>
>> Clojure leans on Java to read that literal. There is no Clojure function
>> to forcibly print it that way again, but you can probably use the Java
>> methods on String or Character to get the String representation of a
>> character somehow.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
On Clojure http://clj-me.cgrand.net/
Clojure Programming http://clojurebook.com
Training, Consulting & Contracting http://lambdanext.eu/

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to