Giter Site home page Giter Site logo

Encoding Issue - loop's. about aspjson HOT 3 CLOSED

tomaslind avatar tomaslind commented on June 10, 2024
Encoding Issue - loop's.

from aspjson.

Comments (3)

rcdmk avatar rcdmk commented on June 10, 2024

Hi @tomaslind,

If you try to write the JSON string contents without parsing them, do you still get screwed results?

Can you please provide example data that would reproduce the issue in the snippet?

from aspjson.

tomaslind avatar tomaslind commented on June 10, 2024

Thanks for a quick response...Below is an example

`Json Object Example

{
"data":[
{
"id":1,
"admin_name":"Round",
"translation":[
{
"language":"CA_en",
"name":"Round"
},
{
"language":"CA_fr",
"name":"Rond"
}
]
},
{
"id":2,
"admin_name":"Square",
"translation":[
{
"language":"CA_en",
"name":"Square"
},
{
"language":"CA_fr",
"name":"Carré"
}
]
}
]
}

JSON_oa_shapes.parse(Json Object Example)

for each item in JSON_oa_shapes("data").items
if isObject(item) and typeName(item) = "JSONobject" then
item.write()
else
response.write item
end if

response.write "<br>"

next`

from aspjson.

rcdmk avatar rcdmk commented on June 10, 2024

Hi,

Sorry for the late reply. I hope you have figured it out already, but if not, that's an encoding issue with the way your server is set to write to the response.

Try setting Response.CodePage = 65001 ' Unicode and see if that helps.
If it helps, you can set that at session level, application level (web.config) or server level (IIS settings), depending on your needs.

You can easily find those settings with a quick search in Google.

Best,
Ricardo

from aspjson.

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.