Coder Social home page Coder Social logo

Comments (20)

germancecch avatar germancecch commented on July 18, 2024 1

Maybe this commit?
8b2b327#diff-11db236acd6b02b1229e7d325e9bf8edb521032e6388f68b6a884ec24bbe291fR36

from jsonview.

Hanmac avatar Hanmac commented on July 18, 2024 1

i still get the same problem with 2.6.1 in Firefox 121.0.1

The Fix Encoding Button fixes it temporarly

from jsonview.

bhollis avatar bhollis commented on July 18, 2024

That's pretty exciting - I don't think anything changed with how that works.

from jsonview.

bhollis avatar bhollis commented on July 18, 2024

Thanks, that's likely it. I've submitted 2.4.1 with the fix.

from jsonview.

germancecch avatar germancecch commented on July 18, 2024

I dont see v2.4.1 in github or in the FF store, only on chrome store.
There is a revision window before being published?

from jsonview.

bhollis avatar bhollis commented on July 18, 2024

Yes they have to review it. No idea how long that will take, Firefox has about a week's lag these days.

from jsonview.

balagez avatar balagez commented on July 18, 2024

I have 2.4.1 and the issue is still present: screenshot
And it's not only the arrows but basically any UTF-8 text, like Japanese here: screenshot

from jsonview.

germancecch avatar germancecch commented on July 18, 2024

Problem solved for me with 2.4.1. TY!

Problem not solved for me

from jsonview.

balagez avatar balagez commented on July 18, 2024

It's not still working for me. I already have that: Screenshot 2023-05-16 at 10 44 25

from jsonview.

stanio avatar stanio commented on July 18, 2024

@balagez, are you able to see https://jsonview.com/example.json fine?

from jsonview.

balagez avatar balagez commented on July 18, 2024

@stanio Yes that works. Here's an example that doesn't: https://kinja.com/api/core/post/1849599382

Edit: Not sure if it matters but https://jsonview.com/example.json returns this header:

content-type: application/json; charset=utf-8

while my example has

content-type: application/json

According to the JSON RFC the default encoding for JSON content is UTF-8 so the explicit charset shouldn't be necessary for the application/json MIME type.

from jsonview.

germancecch avatar germancecch commented on July 18, 2024

The rfc8259 defines that:

Note:  No "charset" parameter is defined for this registration.
      Adding one really has no effect on compliant recipients.

I thing the plugin must assume utf-8 if no content-type/charset is received.

from jsonview.

stanio avatar stanio commented on July 18, 2024

Here's an example that doesn't: https://kinja.com/api/core/post/1849599382

FWIW, on that "page" I'm seeing the "Repair Text Encoding" item active:

shot1

shot2

After activating it the content is seen fine:

shot3

Not sure what's going on. Saving the file locally with a .json extension and opening that in Firefox, displays it fine this time around.

from jsonview.

bhollis avatar bhollis commented on July 18, 2024

For later reference it appears that this only happens on Firefox?

from jsonview.

stanio avatar stanio commented on July 18, 2024

For me yes, it appears only in Firefox. The same looks fine in MS Edge, for example.

FWIW, with ASCII-only JSON I'm not getting a "Repair Text Encoding" option and the collapsers remain mangled.

from jsonview.

bhollis avatar bhollis commented on July 18, 2024

MS Edge hasn't updated because they no longer accept this extension.

from jsonview.

stanio avatar stanio commented on July 18, 2024

In both of my Firefox and Edge extensions, I'm seeing JSONView Version 2.4.1. Could be I've installed it from the Chrome Web Store, don't really remember.

from jsonview.

bhollis avatar bhollis commented on July 18, 2024

What's happening with the document in https://kinja.com/api/core/post/1849599382 is that it does not specify an encoding, but Firefox is guessing that the encoding is windows-1252. JSONView always parses and transforms to UTF-8, because the JSON spec requires that all valid JSON documents are UTF-8.

JSONView 2.4.2 is going out (in the review queues) which will fix this, but I'd recommend always specifying an encoding.

from jsonview.

balagez avatar balagez commented on July 18, 2024

Now it's working as expected. Whether or not the server should send the encoding is almost a decade old debate, and and both Chromium and Firefox seem to have been non-compliant at some point in the past:

An opinionated framework, such as Play in my case, may not give us the option to change the Content-Type header.

Up until recently Firefox handled it well so I assume it's a recent regression in Firefox. Anyways, thank you for fixing it.

from jsonview.

blkhwks19 avatar blkhwks19 commented on July 18, 2024

@bhollis I'm still getting the same issue with 2.6.1 in Firefox 124.0.2. However I do NOT have the "Repair Text Encoding" option available. It's grayed out, so I can't use that as a temporary fix. Screenshot from REST Countries API below.
screenshot

from jsonview.

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.