From BlogBlaster at common-lisp.net Mon Oct 1 00:50:00 2007 From: BlogBlaster at common-lisp.net (BlogBlaster at common-lisp.net) Date: 30 Sep 2007 17:50:00 -0700 Subject: [cl-json-devel] "How would you like to have your ad on 2 Million Websites ?" Message-ID: <20070930175000.80517BB4DF749861@from.header.has.no.domain> An HTML attachment was scrubbed... URL: From Hit-Booster at common-lisp.net Thu Oct 4 15:03:34 2007 From: Hit-Booster at common-lisp.net (Hit-Booster at common-lisp.net) Date: 04 Oct 2007 08:03:34 -0700 Subject: [cl-json-devel] How to get free quality visitors to your website? Message-ID: <20071004004348.8EE414908B@common-lisp.net> No Matter what you are selling - Hit-Booster will send targeted visitors to your website! Within 15 minutes you will have your own website traffic generator that will bring in an ever increasing amount of hits to your websites! Automatically Let me tell you what Hit-Booster can do for you ...Hit-Booster will start sending hits to your website instantly at $0 cost to you! ...No matter what you are selling or offering - HIT BOOSTER will pull in hordes of potential customers to your website or affiliate website! ...sets this up completely for you on Auto-Pilot! ...Use it for all of your websites - there is no limit . ...Receive my personal support and email address with your purchase so I can help you to succeed! ...your web site will quickly achieve Ultra High Link Popularity on the Major Search Engines ...you'll get 1000's of Highly Targeted visitors to your web site or affiliate web site overnight ...many are getting more Customers and Sales than they can handle http://www.promote-biz.net/mg/ Unsubscribe webmaster at promote-biz.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From Feed at common-lisp.net Sun Oct 14 00:10:08 2007 From: Feed at common-lisp.net (Feed at common-lisp.net) Date: 13 Oct 2007 17:10:08 -0700 Subject: [cl-json-devel] Feed Blaster puts your ad right to the screens of millions in 15 Minutes ! Message-ID: <20071013171008.E855A7BAE64E2C5B@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Instant at common-lisp.net Wed Oct 17 02:35:53 2007 From: Instant at common-lisp.net (Instant at common-lisp.net) Date: 16 Oct 2007 19:35:53 -0700 Subject: [cl-json-devel] Can you afford to lose 300, 000 potential customers per year ? Message-ID: <20071016193553.11C2130E1F91B40D@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Income at common-lisp.net Sat Oct 20 00:23:37 2007 From: Income at common-lisp.net (Income at common-lisp.net) Date: 19 Oct 2007 17:23:37 -0700 Subject: [cl-json-devel] How would you like an extra $500 - $1000 a week with 15 minutes of your time ? Message-ID: <20071019172337.5146478987EE454F@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Hit-Booster at common-lisp.net Wed Oct 24 02:27:01 2007 From: Hit-Booster at common-lisp.net (Hit-Booster at common-lisp.net) Date: 23 Oct 2007 19:27:01 -0700 Subject: [cl-json-devel] How to get free quality visitors to your website? Message-ID: <20071023120647.A161660135@common-lisp.net> An HTML attachment was scrubbed... URL: From chris at terraminds.com Tue Oct 23 17:22:41 2007 From: chris at terraminds.com (Chris Laux) Date: Tue, 23 Oct 2007 19:22:41 +0200 Subject: [cl-json-devel] Bug in encode.lisp Message-ID: <471E2DE1.8020000@terraminds.com> Hi, I've only just started using cl-json, but kanji don't seem to be encoded properly, using the darcs version. The problem can be resolved by changing the following conditional (see diff below), so I'm guessing that's a bug? Thanks for making cl-json available btw. Cheers, Chris Laux 105c105 < ((> code #x1f) --- > ((<= code #x1f) From henrik at evahjelte.com Wed Oct 24 08:27:08 2007 From: henrik at evahjelte.com (Henrik Hjelte) Date: Wed, 24 Oct 2007 10:27:08 +0200 Subject: [cl-json-devel] Bug in encode.lisp In-Reply-To: <471E2DE1.8020000@terraminds.com> References: <471E2DE1.8020000@terraminds.com> Message-ID: <50e8e4f60710240127w3a722bebs3d1e20200a4a1167@mail.gmail.com> Hello, thanks for reporting the problem. My ambition with cl-json is that is should be completely trustworthy and fully tested. It has unit tests that are based on the official testcase data for json and lots of other testcases. However, in your case I am not sure I get the problem and the fix: On 10/23/07, Chris Laux wrote: > but kanji don't seem to be encoded > properly, using the darcs version. The problem can be resolved by > changing the following conditional (see diff below), so I'm guessing > that's a bug? > < ((> code #x1f) > --- > > ((<= code #x1f) Do you want to change write-json-chars to encode every character with a code *above* #x1f to a numeric unicode code? If you are having some sort of unicode decoding problem I can see that this indeed will fix your problem, but it is not a proper solution. That means you are having problems with kanji unicode somewhere else in your environment, in your Lisp, your webserver or whatever, and encoding each character as a numeric unicode number is just a quick fix. (and it is not how json is intended to look like, even though it is strictly valid). Or did I completely misunderstand it? Also, can you elaborate on the problem. Is it possible to state the problem in a way that I can make a testcase from (expected-input > do something > expected output)? Also, what is your environment. Which lisp, os and so on. Can your Lisp handle unicode? That is I guess an implicit requirement for cl-json, maybe I should make that clearer. Thanks again, I would really like to help you sort this out. /Henrik Hjelte This is how it the code looks now (and should look in my opinion). Characters below #x1f are encoded as hex uncode values, character above are written as characters (write-char), we trust your lisp system uses unicode. Some special characters are written in other ways, for example newlines as \n. (defun write-json-chars (s stream) (declare (inline lisp-special-char-to-json)) (loop for ch across s for code = (char-code ch) for special = (lisp-special-char-to-json ch) do (cond ((and special (not (char= special #\/))) (write-char #\\ stream) (write-char special stream)) ((<= code #x1f) (format stream "\\u~4,'0x" code)) (t (write-char ch stream))))) From chris at terraminds.com Wed Oct 24 09:03:01 2007 From: chris at terraminds.com (Chris Laux) Date: Wed, 24 Oct 2007 11:03:01 +0200 Subject: [cl-json-devel] Bug in encode.lisp In-Reply-To: <50e8e4f60710240127w3a722bebs3d1e20200a4a1167@mail.gmail.com> References: <471E2DE1.8020000@terraminds.com> <50e8e4f60710240127w3a722bebs3d1e20200a4a1167@mail.gmail.com> Message-ID: <471F0A45.30207@terraminds.com> Ok sorry about that, I was too tired for working and should have slept over that email. You're right of course, the low codes need to be escaped. I saw other JSON APIs escaping all the "high" unicode chars (e.g kanji) and thought it was part of the standard. As I don't develop javascript myself and only offer an API with JSON output, I don't really know if there's going to be a problem with unescaped unicode. Probably not. Thanks, Chris Henrik Hjelte wrote: > Hello, > thanks for reporting the problem. My ambition with cl-json is that is > should be completely trustworthy and fully tested. It has unit tests > that are based on the official testcase data for json and lots of > other testcases. > > However, in your case I am not sure I get the problem and the fix: > > On 10/23/07, Chris Laux wrote: >> but kanji don't seem to be encoded >> properly, using the darcs version. The problem can be resolved by >> changing the following conditional (see diff below), so I'm guessing >> that's a bug? >> < ((> code #x1f) >> --- >>> ((<= code #x1f) > > Do you want to change write-json-chars to encode every character with > a code *above* #x1f to a numeric unicode code? If you are having some > sort of unicode decoding problem I can see that this indeed will fix > your problem, but it is not a proper solution. That means you are > having problems with kanji unicode somewhere else in your environment, > in your Lisp, your webserver or whatever, and encoding each character > as a numeric unicode number is just a quick fix. (and it is not how > json is intended to look like, even though it is strictly valid). > Or did I completely misunderstand it? > > Also, can you elaborate on the problem. Is it possible to state the > problem in a way that I can make a testcase from (expected-input > do > something > expected output)? > > Also, what is your environment. Which lisp, os and so on. > > Can your Lisp handle unicode? That is I guess an implicit requirement > for cl-json, maybe I should make that clearer. > > Thanks again, I would really like to help you sort this out. > > /Henrik Hjelte > > This is how it the code looks now (and should look in my opinion). > Characters below #x1f are encoded as hex uncode values, character > above are written as characters (write-char), we trust your lisp > system uses unicode. Some special characters are written in other > ways, for example newlines as \n. > > (defun write-json-chars (s stream) > (declare (inline lisp-special-char-to-json)) > (loop for ch across s > for code = (char-code ch) > for special = (lisp-special-char-to-json ch) > do > (cond > ((and special (not (char= special #\/))) > (write-char #\\ stream) > (write-char special stream)) > ((<= code #x1f) > (format stream "\\u~4,'0x" code)) > (t (write-char ch stream))))) > From henrik at evahjelte.com Wed Oct 24 10:04:16 2007 From: henrik at evahjelte.com (Henrik Hjelte) Date: Wed, 24 Oct 2007 12:04:16 +0200 Subject: [cl-json-devel] Bug in encode.lisp In-Reply-To: <471F0A45.30207@terraminds.com> References: <471E2DE1.8020000@terraminds.com> <50e8e4f60710240127w3a722bebs3d1e20200a4a1167@mail.gmail.com> <471F0A45.30207@terraminds.com> Message-ID: <50e8e4f60710240304q4ee9734fl2e1c47db21898545@mail.gmail.com> If there is a problem, but I don't think there is, we could add an option to encode high unicode chars as hex. /Henrik From BlogBlaster at common-lisp.net Sun Oct 28 13:35:30 2007 From: BlogBlaster at common-lisp.net (BlogBlaster at common-lisp.net) Date: 28 Oct 2007 05:35:30 -0800 Subject: [cl-json-devel] "How would you like to have your ad on 2 Million Websites ?" Message-ID: <20071028053530.068C88708F5D1620@from.header.has.no.domain> An HTML attachment was scrubbed... URL: