Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Should read-string support \x.. escaped characters?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dave Sann  
View profile  
 More options Dec 23 2011, 8:43 pm
From: Dave Sann <daves...@gmail.com>
Date: Fri, 23 Dec 2011 17:43:00 -0800 (PST)
Subject: Should read-string support \x.. escaped characters?

When sending data as strings from clojurescript to clojure there will be
issues if the source data contains certain unicode characters. (I think in
range 128-255 - extended latin characters mostly).

This is because the goog string conversion used by pr-str encodes these
characters as \x.. not \u00..

read-string will throw an exception if it encounters these characters.

Should read-string support these character escapes?

by way of work around, I am using:

(require '[clojure.string :as s])

(defn unescape [string]
  (s/replace
    string #"\\x(..)"
    (fn [m] (str (char (Integer/parseInt (second m) 16))))))

(defn my-read-string [s]
  (read-string (unescape s)))

Causes : https://github.com/ibdknox/pinot/issues/16

Cheers

Dave


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Softaddicts  
View profile  
 More options Dec 24 2011, 10:23 am
From: Softaddicts <lprefonta...@softaddicts.ca>
Date: Sat, 24 Dec 2011 10:23:51 -0500
Local: Sat, Dec 24 2011 10:23 am
Subject: Re: Should read-string support \x.. escaped characters?
My mother language being French, I would be naturally inclined to say yes.
However I do have a real concern, I am currently evaluating a dashboard option to be
added to our hospital integration product and our pilot site uses French.

I am counting on ClojureScript in the browser to make this thing
quite dynamic. Hospital personnel will carry tablets with them to enter data and
several huge screens will be installed so people can find where patients are located
at any moment.

Luc

--
Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail!

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stuart Sierra  
View profile  
 More options Jan 1 2012, 12:46 pm
From: Stuart Sierra <the.stuart.sie...@gmail.com>
Date: Sun, 1 Jan 2012 09:46:51 -0800 (PST)
Local: Sun, Jan 1 2012 12:46 pm
Subject: Re: Should read-string support \x.. escaped characters?

One of the goals of having a reader/printer in ClojureScript is to enable
transparent data exchange between Clojure and ClojureScript.

I don't know right away what the correct approach here should be: either
pr-str in ClojureScript should print character escapes in the form expected
by the Clojure reader, or the Clojure reader should support the additional
character escape form.

I've created a new wiki page to document the issue:
http://dev.clojure.org/pages/viewpage.action?pageId=4063586

-Stuart Sierra
clojure.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brandon Bloom  
View profile  
 More options Apr 24 2012, 2:20 pm
From: Brandon Bloom <snprbo...@gmail.com>
Date: Tue, 24 Apr 2012 11:20:11 -0700 (PDT)
Local: Tues, Apr 24 2012 2:20 pm
Subject: Re: Should read-string support \x.. escaped characters?

Surprisingly, this differs from JSON, which only supports \u...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Sann  
View profile  
 More options Jul 13 2012, 11:37 pm
From: Dave Sann <daves...@gmail.com>
Date: Fri, 13 Jul 2012 20:37:19 -0700 (PDT)
Local: Fri, Jul 13 2012 11:37 pm
Subject: Re: Should read-string support \x.. escaped characters?

opened: http://dev.clojure.org/jira/browse/CLJ-1025


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »