Skip to main content
Filter by
Sorted by
Tagged with
842 votes
12 answers
1.3m views

Say I have a URL http://example.com/query?q= and I have a query entered by the user such as: random word £500 bank $ I want the result to be a properly encoded URL: http://example.com/query?q=...
user1277546's user avatar
  • 8,822
353 votes
4 answers
740k views

Can we convert a hex string to a byte array using a built-in function in C# or do I have to make a custom method for this?
Blankman's user avatar
  • 269k
1515 votes
16 answers
591k views

When encoding a query string to be sent to a web server - when do you use escape() and when do you use encodeURI() or encodeURIComponent(): Use escape: escape("% +&="); OR use encodeURI(...
Adam's user avatar
  • 28.9k
376 votes
14 answers
239k views

I need to get UTF-8 working in my Java webapp (servlets + JSP, no framework used) to support äöå etc. for regular Finnish text and Cyrillic alphabets like ЦжФ for special cases. My setup is the ...
kosoant's user avatar
  • 11.6k
190 votes
14 answers
415k views

I have many "can't encode" and "can't decode" problems with Python when I run my applications from the console. But in the Eclipse PyDev IDE, the default character encoding is set to UTF-8, and I'm ...
Ali Nadalizadeh's user avatar
164 votes
16 answers
400k views

With reference to the following thread: Java App : Unable to read iso-8859-1 encoded file correctly What is the best way to programatically determine the correct charset encoding of an inputstream/...
Joel's user avatar
  • 30.3k
210 votes
23 answers
167k views

I am programmatically exporting data (using PHP 5.2) into a .csv test file. Example data: Numéro 1 (note the accented e). The data is utf-8 (no prepended BOM). When I open this file in MS Excel is ...
Freddo411's user avatar
  • 2,353
189 votes
4 answers
246k views

I have seen few py scripts which use this at the top of the script. In what cases one should use it? import sys reload(sys) sys.setdefaultencoding("utf-8")
mlzboy's user avatar
  • 14.7k
87 votes
9 answers
130k views

How can I convert this string: This string contains the Unicode character Pi(π) into an escaped ASCII string: This string contains the Unicode character Pi(\u03a0) and vice versa? The current ...
Ali's user avatar
  • 1,533
16 votes
1 answer
4k views

I am trying to pipe the content of a file to a simple ASCII symmetrical encryption program i made. It's a simple program that reads input from STDIN and adds or subtracts a certain value (224) to each ...
Adel M.'s user avatar
  • 500
190 votes
6 answers
575k views

I am writing a Python 3.3 program to send some data to a webpage using POST method. Mostly for debugging process I am getting the page result and displaying it on the screen using print() function. ...
Carlos Eugenio Thompson Pinzón's user avatar
1060 votes
19 answers
589k views

I've heard people talking about "base 64 encoding" here and there. What is it used for?
MrDatabase's user avatar
  • 44.7k
182 votes
12 answers
178k views

I want to achieve Base64 URL safe encoding in C#. In Java, we have the common Codec library which gives me an URL safe encoded string. How can I achieve the same using C#? byte[] toEncodeAsBytes = ...
Vishvesh Phadnis's user avatar
155 votes
11 answers
268k views

I'd like to write a T-SQL query where I encode a string as a Base64 string. Surprisingly, I can't find any native T-SQL functions for doing Base64 encoding. Does a native function exist? If not, ...
Jacob's user avatar
  • 79k
258 votes
8 answers
630k views

I've got a legacy app just starting to misbehave, for whatever reason I'm not sure. It generates a bunch of HTML that gets turned into PDF reports by ActivePDF. The process works like this: Pull an ...
Cᴏʀʏ's user avatar
  • 108k
994 votes
21 answers
2.0m views

I'm converting something from VB into C#. Having a problem with the syntax of this statement: if ((searchResult.Properties["user"].Count > 0)) { profile.User = System.Text.Encoding....
nouptime's user avatar
  • 10.6k
438 votes
5 answers
483k views

In Python 2.7, given a URL like: example.com?title=%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D0%B2%D0%B0%D1%8F+%D0%B7%D0%B0%D1%89%D0%B8%D1%82%D0%B0 How can I decode it to the expected result, example.com?title=...
swordholder's user avatar
  • 5,009
781 votes
21 answers
442k views

I have heard conflicting opinions from people - according to the Wikipedia UTF-8 page. They are the same thing, aren't they? Can someone clarify?
sarsnake's user avatar
  • 28k
334 votes
12 answers
314k views

I need to replace all non-ASCII (\x00-\x7F) characters with a space. I'm surprised that this is not dead-easy in Python, unless I'm missing something. The following function simply removes all non-...
dotancohen's user avatar
  • 31.8k
181 votes
6 answers
99k views

PEP 263 defines how to declare Python source code encoding. Normally, the first 2 lines of a Python file should start with: #!/usr/bin/python # -*- coding: <encoding name> -*- But I have seen a ...
Oli's user avatar
  • 16k
505 votes
9 answers
412k views

What's the basis for Unicode and why the need for UTF-8 or UTF-16? I have researched this on Google and searched here as well, but it's not clear to me. In VSS, when doing a file comparison, sometimes ...
SoftwareGeek's user avatar
  • 15.9k
1288 votes
8 answers
1.2m views

Does Node.js have built-in Base64 encoding yet? The reason why I ask this is that final() from crypto can only output hexadecimal, binary or ASCII data. For example: var cipher = crypto.createCipheriv(...
murvinlai's user avatar
  • 50.6k
94 votes
11 answers
124k views

I'm reading a file through a FileReader - the file is UTF-8 decoded (with BOM) now my problem is: I read the file and output a string, but sadly the BOM marker is outputted too. Why this occurs? fr = ...
onigunn's user avatar
  • 4,798
103 votes
23 answers
348k views

I have a string with escaped Unicode characters, \uXXXX, and I want to convert it to regular Unicode letters. For example: "\u0048\u0065\u006C\u006C\u006F World" should become "Hello World" I know ...
SharonBL's user avatar
  • 1,785
74 votes
8 answers
73k views

I need to replace Microsoft Word's version of single and double quotations marks (“ ” ‘ ’) with regular quotes (' and ") due to an encoding issue in my application. I do not need them to be HTML ...
Misha M's user avatar
  • 11.4k

1
2 3 4 5
68