Questions tagged [decode]

To convert some encoded data (e.g. bytes, electrical signals) to some representation ready for further processing (e.g. string, object, picture)

4353 questions
1
vote
1 answer

Decoding html email body Gmail api

What is the correct way to decode an html email body when working with Gmail api. // Expected: "

Test test

" $message = $gmail->users_messages->get('me', $messageId); $payload = $message->getPayload(); $body =…
Angad Dubey
  • 5,067
  • 7
  • 30
  • 51
1
vote
1 answer

Iterate through JSON response when the struct is not known

I have a http server and I would like to handle JSON responses to overwrite a JSON file, and I want to be able to parse any amount of data and structure. So my JSON data could look like this: { "property1": "value", "properties": { …
dcn
  • 21
  • 3
1
vote
1 answer

Python 3.6 openurl behaviour is different in windows OS

I'm a beginner in python language i'm trying to use urlopen by with statement to get file content and print all the words of this file. this is the example which i follow: from urllib.request import urlopen with…
1
vote
0 answers

read and decode tfrecords error tensorflow

i convert my own grayscale dataset with 60*60 pixel to tfrecords with write_tfrecord() but when i want to read and decode them it causes error . what is the problem ? train_tfrecord_addr = './data/train.tfrecords' test_tfrecord_addr =…
Omid Erfanmanesh
  • 547
  • 1
  • 7
  • 29
1
vote
2 answers

FFMPEG: Decode video in h264rgb/libx264rgb error

I did a small program to encode raw images in h264rgb codec with ffmpeg. I use this codec because I needed to encode lossless rgb images (not possible with the classic h264 codec). But now, I have a problem. I'm not able to decode the video…
Furan
  • 21
  • 6
1
vote
2 answers

How to decode _0x*** strings in Javascript?

Today, I found a javascript encoded start with _0x*** I wonder how to encode/decode javascript strings likes following url: JS Example (CodePad) Is there anyone can tell me how to encode/decode like that? And maybe help to decode the javascript…
Simon
  • 101
  • 1
  • 1
  • 8
1
vote
1 answer

Decode HTML from pandas column

I have a data frame where one of the columns is the currency name in spanish fos US Dolares which is Dólares But its encoded on HTML so i actually read 'ó' and i cant find any way to decode this for whole column. This is a problem cause i need to…
Marco
  • 1,112
  • 1
  • 14
  • 34
1
vote
1 answer

How to use cheerio.load in .pipe (cheerio (function ($) {?

I found an HTML compression gulp plugin that I want to use. I encountered a coding problem. This is written in someone else's plugin: gulp.task ('indexHtml', function () {     return gulp.src ('index.html')         .pipe (cheerio (function ($)…
武一鸣
  • 13
  • 3
1
vote
1 answer

Decoding bytes received in a socket with Python

I'm using a LabVIEW simulator that I have connected to via the Python3 socket Library import socket client =…
risail
  • 509
  • 5
  • 14
  • 37
1
vote
0 answers

How do I properly return sanitized data to Javascript application from php?

There's a lot of information on how to sanitize data, but I can't find anything on returning sanitized data. I have user input going into my database so I sanitize it, but now I'm returning it to my application and feel like the whole point of…
DJSweetness
  • 153
  • 1
  • 14
1
vote
1 answer

Swift 4 - Decoding --> [Orders.CodingKeys]' does not conform to expected type 'CodingKey'

I've been trying to decode a json with custom decoding but i am running into a problem that i haven't been able to solve and I am running out of idea. I commented out the additionalInfo in the Order struct on purpose just to make my life easier. Any…
Hoan
  • 155
  • 1
  • 2
  • 11
1
vote
1 answer

Special character gets encoded. Dont know how to revert it?

Im using the function get_query_var() to retrive my url path. My url path looks like: /categories/500-Beställning Now to retrieve this I use: $url = get_query_var('title2'); If I var_dump($url); I get: string(29) "500-Best%C3%A4llning". Now the…
mrfr
  • 1,724
  • 2
  • 23
  • 44
1
vote
1 answer

Golang runes in string or how to convert?

I have a string which contains following text. \xD0\xA4\xD0\xB5\xD0\xB4\xD0\xBE\xD1\x80\xD0\xBE\xD0\xB2 It is not a literal. In string it's stored as separate characters like this ['\','x','D','0','\','x','A','4',...] How to convert this string to…
Anton Globa
  • 133
  • 6
1
vote
1 answer

Decode Json object that has different types

I have a Json data which I use to populate Table Views. Json has one two type of object in its main part which are "Main" and n-number tableview object; Main object has two string type in it ("url" and "bar_name"). Tableview objects has 3 type in…
Mr Some Dev.
  • 315
  • 4
  • 19
1
vote
1 answer

MiniMagick can't write decoded Base64 image

I'm having trouble calling image.write with MiniMagick on a decoded base64 image in Rails. Every line seems to be working properly except for image.write. The code below is in my Rails API ImageController, which my React frontend is hitting through…
dkershaw
  • 201
  • 3
  • 11