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
8
votes
1 answer

Convert numeric character reference notation to unicode string

Is there a standard, preferably Pythonic, way to convert the &#xxxx; notation to a proper unicode string? For example, מפגשי Should be converted to: מפגשי It can be done - quite easily - using string manipulations,…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
8
votes
4 answers

PHP - FTP filename encoding issue

I will be brief. My FTP function returns wrong encoding of filenames $conn_id = ftp_connect("site.com"); ftp_login($conn_id, "login", "pass"); ftp_pasv($conn_id, true); $buff = ftp_nlist($conn_id, "./"); print_r($buff); -> // result array() { …
artnikpro
  • 5,487
  • 4
  • 38
  • 40
8
votes
2 answers

I can't change HTTP request header Content-Type value using jQuery

I tried to override HTTP request header content by using jQuery's AJAX function. It looks like this $.ajax({ type : "POST", url : url, data : data, contentType: "application/x-www-form-urlencoded;charset=big5", beforeSend: function(xhr) { …
Matt
  • 1,671
  • 5
  • 23
  • 34
8
votes
3 answers

How to encode characters from Oracle to XML?

In my environment here I use Java to serialize the result set to XML. It happens basically like this: //foreach column of each row xmlHandler.startElement(uri, lname, "column", attributes); String chars =…
Andre Bossard
  • 6,191
  • 34
  • 52
8
votes
1 answer

How to URL encode a NSString

I am trying to url encode a string, but the NSURLConnection is failing because of a 'bad url'. Here is my URL: NSString *address = mp.streetAddress; NSString *encodedAddress = [address…
Chandler De Angelis
  • 2,646
  • 6
  • 32
  • 45
8
votes
1 answer

Uploaded filename encoding issue for Japanese and Chinese

I am currently using the jQuery-File-Upload. I may upload some files with a Japanese or Chinese file name, and I can see that the file name is for example, "お疲れ様です.txt" or "测试文档.txt" in browser's debug mode, but in the backend(Java), they become…
Edward
  • 939
  • 3
  • 10
  • 17
8
votes
3 answers

Sending a string containing special characters through a TcpClient (byte[])

I'm trying to send a string containing special characters through a TcpClient (byte[]). Here's an example: Client enters "amé" in a textbox Client converts string to byte[] using a certain encoding (I've tried all the predefined ones plus some like…
Philippe Paré
  • 4,279
  • 5
  • 36
  • 56
8
votes
6 answers

How to display a non-ascii filename in the file download box in browsers?

There doesn't seem to be an accepted way of sending down a header parameter in non ascii format. The header for file download usually looks like Content-disposition: attachment; filename="theasciifilename.doc" Except if you smash a utf8 encoded…
Michael Pryor
  • 25,046
  • 18
  • 72
  • 90
8
votes
1 answer

Windows Phone Encoding and Decoding audio using NSpeex. Having issue with decoding?

I am trying to encode a recorded audio using Nspeex and then transfer it over internet and decode on the other end. I am doing all this in Windows Phone 7/8. To encode and decode I am using following code. But while decoding I am not getting the…
Balraj Singh
  • 3,381
  • 6
  • 47
  • 82
8
votes
6 answers

Wrong encoding after activating resource filtering

I am developing a maven based web project. In my web module I am using different language specific resource bundles (german, spain, ....). All my sources are based on UTF-8 and erverything works fine. Now it was necessary to acitvate maven resouce…
Ralph
  • 4,500
  • 9
  • 48
  • 87
8
votes
3 answers

Creating a sample mp3 with fade

I need to know if it is possible to create a 30 second sample MP3 from a WAV file. The generated MP3 file must feature a fade at the start and end. Currently using ffmpeg, but can not find any documentation that would support being able to do such a…
tombazza
  • 646
  • 9
  • 24
8
votes
1 answer

In C# String/Character Encoding what is the difference between GetBytes(), GetString() and Convert()?

We are having trouble getting a Unicode string to convert to a UTF-8 string to send over the wire: // Start with our unicode string. string unicode = "Convert: \u10A0"; // Get an array of bytes representing the unicode string, two for each…
Ryall
  • 12,010
  • 11
  • 53
  • 77
8
votes
3 answers

Does base64_encode() Values for Same String Differ?

I want to use a column that contains the string encoded with base64_encode() function as primary key. But I couldn't get to learn that if same string gets different values when encoded with base64_encode(). Should I check the key existence with…
kubilay
  • 5,047
  • 7
  • 48
  • 66
8
votes
1 answer

Detect what Unicode glyphs exist?

Is there a way in JavaScript/CSS/web stuff to detect whether the system has a valid glyph for a certain Unicode character? For example, I would like to detect whether a certain character in a language shows up as a square box because the user…
Myforwik
  • 3,438
  • 5
  • 35
  • 42
8
votes
4 answers

How get each character from a word with special encoding

I need to get an array with all the characters from a word, but the word has letters with special encoding like á, when I execute the follow code: $word = 'withá'; $word_arr = array(); for ($i=0;$i
leticia
  • 2,390
  • 5
  • 30
  • 41