On 19 April 2011 14:28, erSan <[email protected]> wrote: > Thanks, but PB is the same. > > but i thing that the problem is SpiderMonkey does not use UTF-8 by > default > > I don't know where to set -DJS_C_STRINGS_ARE_UTF8 in APE.1.1.0 for > compile libspidermonkey?? >
Don't bother doing this. This functionality is now runtime-selectable with modern spidermonkey. Simply call JS_SetCStringsAreUTF8() before the first time JS_NewRuntime() is called. This will be somewhere near the end of modules/libape-spidermonkey.c. Wes > I try to find this night, but i hope that Anthony can tell us where to > set this options. > > Thanks > > On 19 avr, 17:49, blueklein76 <[email protected]> wrote: > > I had similar trouble, in my case it was because Http.js always sets > > the content type to 'application/x-www-form-urlencoded' - so your > > 'text/json' gets overwritten. I made these changes to Http.js: > > > > Add to the class: > > > > getHeader: function(key) { > > return (this.headers[key] != undefined) ? > this.headers[key] : null; > > }, > > > > Then change: > > > > if (this.method == 'POST') { > > this.setHeader('Content-length', > this.body.join('&').length); > > this.setHeader('Content-Type', > 'application/x-www-form- > > urlencoded'); > > } > > > > to: > > > > if (this.method == 'POST') { > > if (this.getHeader('Content-Type') == null) { > > this.setHeader('Content-Type', > 'application/x-www-form- > > urlencoded'); > > } > > this.setHeader('Content-length', > this.body.join('&').length); > > } > > > > then in your server side JS you can do: > > > > var request = new Http('http://127.0.0.1/getting.php'); > > request.set('method', 'POST'); > > request.setHeader('Content-Type', 'application/json'); > > ..... > > > > Hope that helps. > > > > On Apr 17, 1:21 am, erSan <[email protected]> wrote: > > > > > > > > > Hi, > > > > > When, on server side, using > > > > > var request = new Http('http://127.0.0.1/getting.php'); > > > request.set('method', 'POST'); > > > request.setHeader('meta', 'http-equiv="content-type" content="text/ > > > json; charset=utf-8"'); > > > var m = JSON.encode({cmd:"get-opened"}); > > > request.write(m); > > > request.getContent(function(result) > > > { > > > var res = JSON.decode(result); > > > > > }); > > > > > then sending res via sendRaw to client the accents are lost. > > > > > when client post same request with dojo.rawXhrPost results OK. > > > > > somebody can it help me.. > > > > > Thanks > > -- > You received this message because you are subscribed to the Google > Groups "APE Project" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/ape-project?hl=en > --- > APE Project (Ajax Push Engine) > Official website : http://www.ape-project.org/ > Git Hub : http://github.com/APE-Project/ > -- Wesley W. Garland Director, Product Development PageMail, Inc. +1 613 542 2787 x 102 -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/
