Giter Site home page Giter Site logo

over-processed escape characters? about pygdbmi HOT 5 CLOSED

cs01 avatar cs01 commented on May 5, 2024
over-processed escape characters?

from pygdbmi.

Comments (5)

cs01 avatar cs01 commented on May 5, 2024

Yikes that's a lot of escape characters. I'll take a look when I get the time and get back to you. Unfortunately it may be a while due to the holidays and travel, etc. Thanks for filing the issue.

from pygdbmi.

vivi00790 avatar vivi00790 commented on May 5, 2024

It's OK. Glad to help. Happy holidays :)

from pygdbmi.

cs01 avatar cs01 commented on May 5, 2024

I believe I fixed this in 0.8.1.0, let me know what you think.

from pygdbmi.

vivi00790 avatar vivi00790 commented on May 5, 2024

alright I've done some tests and here's the result:
commands for test:
python print "{\"a\":1}"
python print "{'id':1, 'cd':{'a':1, 'c':'b'}}"
python print '{"one" : "1", "two" : "2", "three" : "3"}'
image

for the first command, it seems that gdb or pygdbmi still messed on parse python escape chars
the second command is illegal json, but works fine
the third command leads to a weird result, seems gdb or pygdbmi tends to parse the \ again

here are also some tests on escape chars:
python print '\\//\/'
python print '\"\'\\'
image

from pygdbmi.

vivi00790 avatar vivi00790 commented on May 5, 2024

btw I solved my own problem using the third command by
decoded_string = bytes(myString, "utf-8").decode("unicode_escape")
Thank you
just want to told you the crazy escape chars I found

from pygdbmi.

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.