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
4 answers

Escape Quotes in Objective-C

I'm using this code snippet to encode characters to be friendly with a POST request: NSString *unescaped = [textField text]; NSString *escapedString = (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes( …
Moe
  • 4,744
  • 7
  • 28
  • 37
7
votes
2 answers

How to prevent error "code converter not found (UTF-8)"?

I'm getting this error in my production environment (CentOS 5.6), but it runs fine in development (Ubuntu 11.04). In both environments, the app is using Ruby 1.9.3 and Rails 3.0.9 and is served with passenger and nginx. My mechanize gem version is…
dgmdan
  • 405
  • 6
  • 14
7
votes
1 answer

Server-side verification of Android Market Licensing responses with PHP

I'm building a server to test all my in-app purchases of Android market. But I don't think that I'm sending the information from the app correctly. My server is built in PHP. My app access the…
Adelino
  • 2,530
  • 4
  • 20
  • 32
7
votes
2 answers

Bad encoding: why does my medium sized dash is differently encoded on another server?

My "em dash" character is shown differently on two servers. When I visit Server 1: – When I visit Server 2: â€" I'm not using any database connection, just pure HTML. Following are the first 4 lines of my HTML file:
G McLuhan
  • 294
  • 1
  • 4
  • 14
7
votes
1 answer

C/C++ encoding questions

I have a few questions in trying to understand different encodings. What is the default encoding for strings? char ascii[]= "Some text"; // This is plain ASCII right? wchar_t utf[] = L"Some Text"; // Is this UTF-16? Or ASCII stored in…
Josh
  • 6,046
  • 11
  • 52
  • 83
7
votes
4 answers

Oracle SQL Developer environment encoding

I have Oracle SQL Developer (3.1.07) and I'm trying to work with a database that uses WE8ISO8859P1 encoding: SELECT * FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET'; I have problems with saving packages that contains unicode…
ULazdins
  • 1,975
  • 4
  • 25
  • 31
7
votes
3 answers

String SHA-512 Encoding: C# and JAVA result is different

Im trying to compare two different string encoded by sha512. But, result is different. It can be an encode problem i mean. I hope you can help me. This is my Java code: MessageDigest digest = java.security.MessageDigest.getInstance("SHA-512"); …
kinghomer
  • 3,021
  • 2
  • 33
  • 56
7
votes
4 answers

Encoding problems in JSP

I have an html-form with several text fields. When I try to submit not English characters (Russian in my case) server is received "unreadable" string (not questions - "???" but some strange characters). I simplified my code to show it here: <%@…
Roman
  • 64,384
  • 92
  • 238
  • 332
7
votes
5 answers

Why Encoding.Default.GetBytes() returns different results in VB.NET and C#?

We recently came across some sample code from a vendor for hashing a secret key for a web service call, their sample was in VB.NET which we converted to C#. This caused the hashing to produce different input. It turns out the way they were…
Annagram
  • 700
  • 7
  • 16
7
votes
3 answers

How have Html entities inside asp.net page?

Inside an asp.net page, should I use My page's title from México Or My page’s title from México Both examples have the same output. Since asp.net encodes all my pages to utf-8,…
jdecuyper
  • 3,934
  • 9
  • 39
  • 51
7
votes
3 answers

writing French character in csv files in C#

I have a dbf file which has MONTRÉAL as one of the entires. I have to convert this dbf file into a csv file. For this I am reading this dbf file using Microsoft Visual FoxPro Driver driver, then converting converting each rows to comma separated,…
Niraj Choubey
  • 3,942
  • 18
  • 58
  • 93
7
votes
1 answer

Unescape special characters correctly from the URL in Rails 3.0.3

I'm using Rails 3.0.3 with REE ( Ruby 1.8.7 ) and gem 'mysql2', '0.2.6' There's a search feature in my project that enable people to use the GET method using URL or using forms and then generate the URL. Example: I want to search: origin city:…
panggi
  • 73
  • 1
  • 5
7
votes
1 answer

Make Emacs use UTF-8 with Python Interactive Mode

When I start Python from Mac OS' Terminal.app, python recognises the encoding as UTF-8: $ python3.0 Python 3.0.1 (r301:69556, May 18 2009, 16:44:01) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for…
Nathan Shively-Sanders
  • 18,329
  • 4
  • 46
  • 56
7
votes
6 answers

How can I find extended ASCII characters in a file using Perl?

How can I find extended ASCII characters in a file using Perl? Can anyone get the script? .....thanks in advance.....
User1611
  • 1,081
  • 4
  • 18
  • 27
7
votes
6 answers

What could go wrong in switching HTML encoding from UTF-8 to UTF-16?

What are the implications of a change from UTF-8 to UTF-16 for HTML encoding? I would like to know your thoughts on the issue. Are there things I need to think of before making such a change? Note: Interested due to enormous amounts of japanese…
Newbie
  • 7,031
  • 9
  • 60
  • 85