Giter Site home page Giter Site logo

Comments (12)

youkidearitai avatar youkidearitai commented on May 30, 2024

° is convert to \u00b0 of JSON.
https://3v4l.org/iA3HU

Please check character encoding. Maybe ISO-8859-1 and other character encodings.

from php-src.

bukka avatar bukka commented on May 30, 2024

Please provide exact string that is failing. Note that it needs to be valid UTF-8 so if exif data is binary, then it might be obviously failing.

from php-src.

bquimby1 avatar bquimby1 commented on May 30, 2024

from php-src.

bukka avatar bukka commented on May 30, 2024

So provide a string that is failing otherwise we cannot check it out. Basically we need to be able to reproduce it somehow.

from php-src.

bquimby1 avatar bquimby1 commented on May 30, 2024

from php-src.

bukka avatar bukka commented on May 30, 2024

The string that you provided is not failing:

var_dump(json_encode('+First Winter hike of the season. 20°F during the hike and dropping. This little bird posed nicely. There wasn\'t much wildlife because of the human traffic.'));
string(163) ""+First Winter hike of the season. 20\u00b0F during the hike and dropping. This little bird posed nicely. There wasn't much wildlife because of the human traffic.""

So please provide string that is actually failing.

from php-src.

bukka avatar bukka commented on May 30, 2024

As @youkidearitai pointed out, your encoding is most likely incorrect. I'm going to close it. If you provide example that is reliable failing, I will be happy to re-open this.

from php-src.

bukka avatar bukka commented on May 30, 2024

you can also verify it using bin2hex to compare both strings and see what the difference is. Then you should see how ° is encoded. UTF-8 should give you

echo bin2hex('°');
c2b0

from php-src.

bquimby1 avatar bquimby1 commented on May 30, 2024

from php-src.

bukka avatar bukka commented on May 30, 2024

If you don't mind potentially longer log entries, try to add there bin2hex($o->exifobj) - this should give info how that string is encoded

from php-src.

bquimby1 avatar bquimby1 commented on May 30, 2024

from php-src.

bukka avatar bukka commented on May 30, 2024

No probs. Feel free to just update this issues and if there's anything not right, I will re-open it.

from php-src.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.