Yes! Thank you! mb_substr (once internal encoding set) solved it!

On Dec 3, 7:00 pm, marti...@gmail.com wrote:
> On Fri, Dec 03, 2010 at 03:43:15PM -0800, GadgetDon wrote:
> > I'm still learning the API, got my experimental site up and running
> > using Abraham William's twitteroauth library.
>
> > For some posts, though, the indicies are wrong, offset by a couple
> > characters too high. For example, status 10716446405427200 has my
> > highlighting the wrong characters - for amazon.com it's highlighting
> > ": Amazon.c". I suspect that there may be some special characters in
> > the status text (maybe an emdash?) that json.decode is helpfully
> > cleaning up for me, but that's just a guess. Anyone ever run into a
> > problem like this and if so - any suggestions?
>
> Just a guess:
>
> php> mb_internal_encoding ('utf8');
> php> echo substr ($str, 69,79-69);
> : Amazon.c
> php> echo mb_substr ($str, 69,79-69);
> Amazon.com
>
> Does it work for you?
>
> --
> Martin R. Dapas

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to