encoding

Asp.Net Query String

I am using Querystring to pass values from one page to other. I am tring to implement encoding and decoding using the Server.UrlDecode and urlEncode. Query string returns a null value, but I can check the values are been sent in URL. The two pages are: QueryString.aspx protected void Page_Load(object sender, EventArgs e) { } protec...

Converting problem ANSI to UTF8 C#

I have a problem with converting a text file from ANSI to UTF8 in c#. I try to display the results in a browser. So I have a this text file with many accent character in it. Its encoded in ANSI, so I have to convert it to utf8 because in the browser instead of the accentchars appearing "?". No matter how I tried to convert to UTF8 it wa...

javax.xml.transform.Transformer encoding entity numbers

Hello, I have a problem using a transformer to generate an XML document. The incoming org.w3c.dom.Document has the entity codes correct: ® However, once the Document is transformed the ampersand is encoded: ® I was expecting ampersands followed by a # to have been respected, but I guess perhaps this is correct behav...

What to do to be sure to get a UTF-8 encoded string back independent from the encoding of the input in PHP

Is there a way to encode any string with any encoding into UTF-8? Is there some native function in PHP? Or is there some function free to use? I had the problem that if I utf8_encode() a UTF-8 encoded string I get some double encoded thing which is useless. I need to encode any incoming string, if it's Unicode, UTF-16, ISO..something...

Character encoding is violated

I am trying to parse a file encoded in utf-8. No operation has problem apart from write to file (or at least I think so). A minimum working example follows: from lxml import etree parser = etree.HTMLParser() tree = etree.parse('example.txt', parser) tree.write('aaaaaaaaaaaaaaaaa.html') example.txt: <html> <body> <invalid ...

what is the difference between Serializing and encoding?

what is the difference between Serializing and encoding? and when should i use each in a web service? ...

Url encoded # (%23) causing 404 in ASP.NET application

I have a deep-linking Silverlight RIA trying to consume a Twitter OAuth callback. The URL of the callback "page" in the RIA is: http://example.com/RiaTestPage.aspx#callback Twitter calls back to this URL so long as the # sign is URL encoded; so the callback url I supply to Twitter is: http://example.com/RiaTestPage.aspx%23callback ...

What PHP code protection tool would you recommend? (encoding/encrypting/obfuscating/etc)

I have a client that is going to start selling a software based on PHP, and he'd like to have some level of piracy protection. We're going to have a basic licensing code check, but we need the code to not be plain-text so that anyone can't go in and comment it out. I've found a lot of "encoding/encrypting/obfuscating" tools. Some are ...

Specify audio output language in Expression Encoder

I'm using the Expression Encoder 3 SDK and I'm trying to specify the output audio language. The ultimate reason I'm doing this is to encode an audio track as english and specify other, optional, audio tracks as other languages. Expression Encoder doesn't support this, but if you encode separate tracks as different languages, the Windows ...

any base64 decoding algorithm in BASIC

I am programming a small micro controller in BASIC. Basically it received some BASE64 encoded data and I need to decode it at my end using BASIC. I was wondering if there is any way to do that? ...

How to detect illegal UTF-8 byte sequences to replace them in java inputstream?

Hi! The file in question is not under my control. Most byte sequences are valid UTF-8, it is not ISO-8859-1 (or an other encoding). I want to do my best do extract as much information as possible. The file contains a few illegal byte sequences, those should be replaces with the replacement character. It's not an easy task, it think it...

What encryption is it?

Hey, I used EtherDetect to see what is one game sending to me and what I'm sending to game server. I was wondering what encryption is it after the packet information which is colored in grey color in the image bellow. How can I encrypt/decrypt information which I'm sending/receiving in my games like this? ...

ffmpeg vstats problems, Missing frames and misleading information!

The Problem I have is when using ffmpeg to encode a YUV using libx264 I don't get all the frame information in -vstats output. It raises the question of how reliable ffmpeg is, and therefore can any 'codec benchmark' review based on ffmpeg be trusted? I am analysing codec's to determine how they perform. I am using ffmpeg and its -vstat...

Encoding problem downloading HTML using mechanize and Python 2.6

browser = mechanize.Browser() page = browser.open(url) html = page.get_data() print html It shows some strange characters. I suppose that it is UTF-8 string but Python doesn't know that and cannot show it properly. How can I convert this string to unicode string like u = u'test' ...

Facebook Graph API - non English album names

I am trying to do a simple thing - get all my albums. the problem is that the album names are non-English ( they are in Hebrew ). The code that retrieves the albums : string query = "https://graph.facebook.com/me/albums?access_token=..."; string result = webClient.DownloadString(query); And this is how one of the returned albums lo...

Shorter Alternative to base64 for PHP?

Hi all, I'm writing myself a script which basically lets me send a load of data in a single get request. I'm using base64 to encode it, but its pretty damn long and I'm concerned the URL may get too big. Does anyone know an alternative, shorter method of doing this? It needs to be decodable when received in a get request, so md5/sha1 a...

Looking for an single byte encoding with grave=xC1 acute=xC2 cedilla=xD0

Having trouble finding a code page or other single byte encoding having accents in these positions: grave in xC1 acute in xC2 cedilla in xD0 ...

HTML encoding &deg; degree symbol extra space

<div id="a">°F</div> $.get("http://blah.com/go",{'TU':$('#a').text()}); IIS server logs show the following params: 99.5% of the time: TU=%C2%B0F 0.5% of the time: TU=%C2%B0+F server subsequently crashes because it doesn't know what '° F' is. Admittedly one of the flaws is that we are scraping text out of the DOM & sending it to our...

Partial HTML encoder

Suppose I have text with HTML tags, but where not all characters have been encoded. Are there any tools to intelligently encode while leaving the tags intact? Example: <h2>A'b</h2> to <h2>A&#39;b-</h2> ...

Regular way to encoding color in 32-bit uint? (RGBA? ARGB? BGRA?)

A R/G/B/A color components can be encoded in a single uint value. But I'm confusing order of the each components. Of course, there is no law, but I want to know more regular or more compatible order to hardware acceleration API like OpenGL. -- edit -- I'm asking about byte encoding order of each channels, not it's terms. ...