To convert some encoded data (e.g. bytes, electrical signals) to some representation ready for further processing (e.g. string, object, picture)
Questions tagged [decode]
4353 questions
1
vote
1 answer
Why can't I decode('utf-16') success in Python3 (even work in Py2)?
In Py2:
(chr(145) + chr(78)).decode('utf-16')
I got u'\u4e91':
But in Py3:
(chr(145) + chr(78)).encode('utf-8').decode('utf-16')
I got an error:
Traceback (most recent call last):
File "", line 1, in
UnicodeDecodeError:…

pingze
- 973
- 2
- 9
- 18
1
vote
1 answer
Decode signs when comparing two strings
I have a form.
I use htmlspecialchars so when user submits the form,
// $_POST['test']; equals to "> 5"
$test = htmlspecialchars($_POST['test'], ENT_QUOTES);
...
$stmt->bindParam(':test', $test);
...
When I pull it from the database, it is like…

Jason Bale
- 363
- 2
- 7
- 14
1
vote
2 answers
aDecoder crash when try to fetch nil value also encoding decoding enum values not working
I have a class with some properties, and I am using encode while saving and decoder while fetching, but some of the data are not optional, but at the first time when I am fetching it's null so when the decoder is calling and it found nill value it…

Iraniya Naynesh
- 1,125
- 3
- 14
- 26
1
vote
1 answer
Converting Base64 to Hex in Redshift / python
We are migrating our database from Postgres to Redshift and we are having some challenges with converting Base64 string to Hex.
In the old situation (in postgres) we have a function :
CREATE OR REPLACE FUNCTION hex_to_int(hexval character varying)
…

Maarten
- 13
- 3
1
vote
0 answers
What information oscilloscope decodes in the beginning of the waveform binary file?
Introduction
I am working with oscilloscope OWON TDS8204. It is possible to save current waveform in binary file with this device. The only information I have now is (seems to be) that data is of 8 bites. So I wrote a simple program to read that…

LRDPRDX
- 631
- 1
- 11
- 23
1
vote
2 answers
Decode the access token from JWT Format
We are using nginx server for reverse proxying with openresty openid lua installed.... This means that every request has an Authorization header containing JWT token - access id and refresh token.
Now, what we need to do is decode the access token…
user9576045
1
vote
1 answer
Compressed JS Decoder
http://www.lotterypost.com/js-compress.aspx
This is site is very nice for compressing JS
but I want to decode....
And instead of online is there any free best tool to encode/decode Js

SOF User
- 7,590
- 22
- 75
- 121
1
vote
2 answers
JSONDecodeError: Expecting value: line 1 column 1 (char 0) error
I am facing this error while making request to fetch json from api.
I can get json data using the "/v1/articles' path.
conn = http.client.HTTPSConnection("api.xxxx.com.tr")
headers = {
'accept': "application/json",
'apikey':…

darkfolcer
- 172
- 1
- 3
- 17
1
vote
3 answers
How to Take a picture and then read its Text using TextRecognizer
so i have this button to take a picture contains Text :
takePic.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
…

Loving Android
- 253
- 5
- 15
1
vote
0 answers
Decode a few times escaped XML characters in C#
I have an input string with a few times escaped XML inner text. E.g.:
some "inner" text
I'd like to have (in a variable) value:
some "inner" text
How can I do it in C#?
I want the solution to handle triple-encoded…

Illia Levandovskyi
- 1,228
- 1
- 11
- 20
1
vote
4 answers
oracle: can you use DECODE across tables?
pretty new to the function, but as i understand DECODE tests the specified attribute (arg1) against another specified value (arg2) and if they match, it displays a result (arg3) otherwise if it doesn't match, the default will display…

Sinaesthetic
- 11,426
- 28
- 107
- 176
1
vote
2 answers
Javascript - parsing a hex value
I am trying to parse a hex value to decode a card
The hex data I receive from the card is f8b2d501f8ff12e0056281ed55
First I am converting this to an integer with parseInt()
var parseData = parseInt('f8b2d501f8ff12e0056281ed55', 16);
The…

Dhiraj
- 2,687
- 2
- 10
- 34
1
vote
1 answer
Decode URL Unix/Bash Command Line (without sed)
I am scraping a website with curl and parsing out what I need.
The URLs are returned with Ascii encoded characters like
GET v2.12/...?fields={fieldname_of_type_Tab} HTTP/1.1
How can I convert this to UTF-8 (char) directly from the command…

Goldfish
- 576
- 1
- 7
- 22
1
vote
1 answer
How prevent Google Tagmanager from changing javascript values?
This is the Custom Html Tag that is in Google Tagmanager: