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
transformation of  
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
  6 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
 
Sean Dague  
View profile  
 More options May 8 2012, 6:36 am
From: Sean Dague <s...@dague.net>
Date: Tue, 08 May 2012 06:36:57 -0400
Local: Tues, May 8 2012 6:36 am
Subject: transformation of &nbsp;
I had just tried to get my drupal meetup_events module lit on a new site
and ran into problems. I eventually narrowed them down to the fact that
when you feed &nbsp; into meetup for the description of an event, the
returned JSON has trasnformed that into some other (possibly unicode?)
character. PHP's json_decode completely chokes on that. Remove the
&nbsp; and life is fine.

I can fix this by just scrubbing the &nbsp; on the push, but I'm
currious what's going on here, and if this is intended behavior in the
json API.

Thanks,

        -Sean

--

Sean Dague                                       Mid-Hudson Valley
s...@dague.net                                   Linux Users Group
http://dague.net                                 http://mhvlug.org


 
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.
Doug Tangren  
View profile  
 More options May 8 2012, 11:07 am
From: Doug Tangren <d...@meetup.com>
Date: Tue, 8 May 2012 11:07:29 -0400
Local: Tues, May 8 2012 11:07 am
Subject: Re: [meetup-api] transformation of &nbsp;

On Tue, May 8, 2012 at 6:36 AM, Sean Dague <s...@dague.net> wrote:
> I had just tried to get my drupal meetup_events module lit on a new site
> and ran into problems. I eventually narrowed them down to the fact that
> when you feed &nbsp; into meetup for the description of an event, the
> returned JSON has trasnformed that into some other (possibly unicode?)
> character. PHP's json_decode completely chokes on that. Remove the &nbsp;
> and life is fine.

> I can fix this by just scrubbing the &nbsp; on the push, but I'm currious
> what's going on here, and if this is intended behavior in the json API.

Hi Sean,

Thanks for reporting this issue. Meetup has recently converted our default
character set encoding on the site to utf8. What you are most likely seeing
is a utf8 encoded variant of &nbsp;

You may notice that many of our API methods still return a the ISO-8859-1
character set encoding so we don't break apps that can't handle utf88.

curl -i 'http://api.meetup.com/2/event/EVENT_ID?key=API_KEY'

When you specific a charset of utf8 explicitly we return that encoding. In
the example call below. You'll see spaces instead of question marks for
encoded spaces.

curl -i -H 'Accept-Charset:utf-8' '
http://api.meetup.com/2/event/EVENT_ID?key=API_KEY'

Let us know if that helps resolve the situation you are in. We are working
on a way to resolve this issue in the API.  Thank you for your patience.

Doug Tangren
Meetup <http://meetup.com/>
API Team


 
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.
Sean Dague  
View profile  
 More options May 8 2012, 11:19 am
From: Sean Dague <s...@dague.net>
Date: Tue, 08 May 2012 11:19:14 -0400
Local: Tues, May 8 2012 11:19 am
Subject: Re: transformation of &nbsp;
On 05/08/2012 11:07 AM, Doug Tangren wrote:

Ok, I'm just using
http://api.drupal.org/api/drupal/includes%21common.inc/function/drupa...

Haven't set any headers, and I'm getting the utf-8 return. Is the
default handling with no header perhaps wrong? Should I force an
Accept-Charset:ISO-8859-1 ?

        -Sean

--

Sean Dague                                       Mid-Hudson Valley
s...@dague.net                                   Linux Users Group
http://dague.net                                 http://mhvlug.org


 
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.
Doug Tangren  
View profile  
 More options May 8 2012, 11:27 am
From: Doug Tangren <d...@meetup.com>
Date: Tue, 8 May 2012 11:27:05 -0400
Local: Tues, May 8 2012 11:27 am
Subject: Re: [meetup-api] Re: transformation of &nbsp;

In this case you want the Accept-Charset header to be utf-8

 
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.
Sean Dague  
View profile  
 More options May 8 2012, 11:38 am
From: Sean Dague <s...@dague.net>
Date: Tue, 08 May 2012 11:38:07 -0400
Local: Tues, May 8 2012 11:38 am
Subject: Re: transformation of &nbsp;
On 05/08/2012 11:27 AM, Doug Tangren wrote:

>     Haven't set any headers, and I'm getting the utf-8 return. Is the
>     default handling with no header perhaps wrong? Should I force an
>     Accept-Charset:ISO-8859-1 ?

> In this case you want the Accept-Charset header to be utf-8

Ok, got it, and it seems to work.

        -Sean

--

Sean Dague                                       Mid-Hudson Valley
s...@dague.net                                   Linux Users Group
http://dague.net                                 http://mhvlug.org


 
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.
Nathan @ Meetup  
View profile  
 More options May 14 2012, 1:51 pm
From: "Nathan @ Meetup" <nat...@technically.us>
Date: Mon, 14 May 2012 10:51:25 -0700 (PDT)
Local: Mon, May 14 2012 1:51 pm
Subject: Re: transformation of &nbsp;

We've launched a change related to this problem. Since nonbreaking space
characters in iso-8859-1, though valid, have caused trouble for some JSON
parsers, we're replacing them with plain spaces for that encoding.
Responses in utf-8 will continue to include nonbreaking spaces and any
other characters that make up the text.

Nathan


 
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 »