Questions tagged [encoding]

Encoding is a set of predefined rules to reversibly transform a piece of information in a certain representation into a completely different representation. The other way round is called decoding. This tag is rather generic, but it is mainly used for binary encoding schemes such as base 64 and hexadecimal.

There are a lot of different applications:

  • which is how the computer represents characters like a and , which humans can recognize, into bytes, which computers can recognize.
  • which is used to transform between videos and bytes.
  • which is used to transform between plain text and valid URIs. Also known as .
  • which is used to transform between plain text and valid XML.
  • which is used to compress/decompress bytes.
24174 questions
7
votes
1 answer

What is the reason for encoding JWT?

To the best of my knowledge regarding the security of JWT, if the JWT token doesn’t contain sensitive information, we only use its signature feature so that its content cannot be manipulated. Otherwise, if it contains sensitive data it can be…
Amir Molaei
  • 3,700
  • 1
  • 17
  • 20
7
votes
4 answers

Strange characters in Javascript causing it to not load

My site works fine on localhost, my javascript is loading and working fine. But when I deploy the site the script is not working. When I right click the page and say view source and then view the linked script file, it has some strange characters at…
greg
  • 71
  • 1
  • 2
7
votes
6 answers

C# convert string into its byte[] equivalent

At this point most people will be thinking "Ah ill post this..:" byte[] dataB= System.Text.Encoding.ASCII.GetBytes(data); However.. the problem I have is i need the exact value of the bytes with no encoding just the pure value for each byte. For…
redorkulated
  • 404
  • 1
  • 7
  • 13
7
votes
2 answers

Redirecting python output to a file causes UnicodeEncodeError on Windows

I'm trying to redirect output of python script to a file. When output contains non-ascii characters it works on macOS and Linux, but not on Windows. I've deduced the problem to a simple test. The following is what is shown in Windows command prompt…
sancoder
  • 93
  • 6
7
votes
1 answer

Encoding and decoding binary data for inclusion into JSON with Python 3

I need to decide on a schema for including binary elements into a message object so that it can be decoded again on the receiving end (In my situation a consumer on an Rabbit MQ / AMQP queue). I decided against multipart MIME encoding over JSON…
The Tahaan
  • 6,915
  • 4
  • 34
  • 54
7
votes
1 answer

Why Azure appsettings encoding bring me wrong chars?

I have a problem whit the azure appsettings encoding. I have a node.js application deployed into an app service. When calling the environment variables using process.env, the values are comming in wrong encoding. I was expect a "utf8" encoding…
7
votes
9 answers

MySQL db question marks instead of hebrew characters..?

I'm trying to build a shopping cart using PHP & MySQL. my db in MySQL is utf8 and my table in the db is utf8, How can I use Hebrew characters?
Amir
  • 71
  • 1
  • 1
  • 2
7
votes
1 answer

nroff/groff does not properly convert utf-8 encoded file

I am having a utf-8 encoded roff-file that I want to convert to a manpage with $ nroff -mandoc inittab.5 However, characters in [äöüÄÖÜ], e.g. are not displayed properly as it seems that nroff assumes ISO 8859-1 encoding (I am getting [äöüÃÃÃ]…
Simon Fromme
  • 3,104
  • 18
  • 30
7
votes
2 answers

How to escape JSON string for CSV parsing?

A bit of an odd question perhaps. I'm trying to Store a JSON string appropriately in a CSV column as a string. It works OK when generating the CSV file, however parsing the CSV file with the JSON in it is a problem. I've tried "{"prop": "Val"...}",…
sidewaiise
  • 1,445
  • 3
  • 16
  • 27
7
votes
2 answers

Maven plugin to ensure UTF-8 Encoding?

Is there a Maven plugin I can use to fail my build if the builder notices a file that is not encoded with UTF-8?
Nathan Feger
  • 19,122
  • 11
  • 62
  • 71
7
votes
2 answers

API Data Returning Unicode Characters in Console

I am facing a rather confusing problem since the last two days. I am working on a document management system, that uses an API that pulls in data from SOLR. The data is in tune of around ~15Mbs, and pulls records of more than 4000+ documents. The…
demouser123
  • 4,108
  • 9
  • 50
  • 82
7
votes
2 answers

How to map categorical data to category_encoders.OrdinalEncoder in python pandas dataframe

I'm trying to use category_encoders.OrdinalEncoder to map categories to integers in a pandas dataframe. But I'm getting the following error without any other helpful hints. TypeError: 'NoneType' object is not iterable Code runs fine without the…
jeffhale
  • 3,759
  • 7
  • 40
  • 56
7
votes
2 answers

When escaping a string with HTML entities, can I safely skip encoding chars above Unicode 127 if I use UTF-8?

When outputting a string in HTML, one must escape special characters as HTML entities ("&<>" etc.) for understandable reasons. I've examined two Java implementations of…
Amos
  • 1,403
  • 2
  • 13
  • 19
7
votes
2 answers

How to read text file without knowing the encoding

When reading a text file that was created somewhere else outside my app, the encoding used is unknown. My app has being using NSUnicodeStringEncoding (which is the same as NSUTF16StringEncoding) so have problems reading other than UTF16 encoded…
nacho4d
  • 43,720
  • 45
  • 157
  • 240
7
votes
1 answer

What is Base94 encoding and how does it work?

I googled and could not find much information on Base94 encoding. Does anyone has more details about this encoding?
Jay P
  • 119
  • 2
  • 7
1 2 3
99
100