encoding

French letters on an aspx page

I have a winForm application that generates an .aspx file based on the user input in the application. The problem happens when a user enters the French letters like "é", "à", "è", "â", "ù", "ô", "ê" and "ç". It is supposed to look like a simple text on the page but it doesn't. Any ideas? ...

decodeURIComponent vs unescape, what is wrong with unescape ?

In answering another question I became aware that my Javascript/DOM knowledge had become a bit out of date in that I am still using escape/unescape to encode the contents of URL components whereas it appears I should now be using encodeURIComponent/decodeURIComponent instead. What I want to know is what is wrong with escape/unescape ? T...

Encoding Problem in Vimdiff?

How can you solve the following encoding problem? http://dl.getdropbox.com/u/175564/encoding.png It is rather hard to compare the manuals. ...

Source file Encoding in Visual Studio (VS2005 but can apply to other versions)

Is there an option to easily view the current file's encoding (utf-8, utf-8 w/out BOM, ascii, western, etc)? I am working mostly on the web applications, so this is crucial to me. I can't find this anywhere besides the "Save as" dialog... When you are saving a file in Visual Studio, you can choose "Save MyClass.cs as", and then click o...

Encoding & Data Transfer Optimization

Hi, I am developing a solution which will include data transfer between mobile phone and server. However, I would like to minimize the quantity of the transferred data. I was planning to try several types of encoding with TCP/UDP connection and measure the traffic and data loss. Otherwise I believe there already exist some kind of reco...

Decoding HTML Entities With Python

The following Python code uses BeautifulStoneSoup to fetch the LibraryThing API information for Tolkien's "The Children of Húrin". import urllib2 from BeautifulSoup import BeautifulStoneSoup URL = ("http://www.librarything.com/services/rest/1.0/" "?method=librarything.ck.getwork&id=1907912" "&apikey=2a2e596b887...

System.IO.StreamWrite and Spanish Characters

I need to write the following string to a txt a File: SEGS,AUS1,1,0,0,712205,584,8659094,2,NUÑEZ FELIX ARTURO,584 I when I use: using (System.IO.StreamWriter sw = new System.IO.StreamWriter(@fileSobrantes, true)) { sw.WriteLine("SEGS,AUS1,1,0,0,712205,584,8659094,2,NUÑEZ FELIX ARTURO,584"); } I get this in the file SEG...

.NET: How do I tell if an encoding supports all the chars in my string?

I've got lots of text that I need to output, which includes all sorts of characters from many languages. Sometimes I need to output the text in character encodings other than Unicode (eg, Shift-JIS, or ISO-8859-2), in order to match the page it's going to. If the text has characters that the encoding can't handle (eg, Japanese character...

RTMP Stream Bitrate alternatives

Which bit rates would you assign as normal and high based on a HD-H.264 RTMP stream considering exclusively broadband connections (using a progressive stream fallback for slower connections) ? EDIT : Lacking of answers I realize my question is just far too vague. The "answer" was not meant to be a solution in itself - which is just not...

How to best detect encoding in XML file?

To load XML files with arbitrary encoding I have the following code: Encoding encoding; using (var reader = new XmlTextReader(filepath)) { reader.MoveToContent(); encoding = reader.Encoding; } var settings = new XmlReaderSettings { NameTable = new NameTable() }; var xmlns = new XmlNamespaceManager(settings.NameTable); var context =...

HttpWebRequest: Receiving response with the right encoding

I'm currently downloading an HTML page, using the following code: Try Dim req As System.Net.HttpWebRequest = DirectCast(WebRequest.Create(URL), HttpWebRequest) req.Method = "GET" Dim resp As Net.HttpWebResponse = DirectCast(req.GetResponse(), Net.HttpWebResponse) Dim stIn As IO.StreamReader = New IO.StreamReader(resp.GetResponseStre...

File encoding when reading a file with StreamReader

I am now having an issue where Celsius symbol gets read as C instead of °C. Looks like the encoding the culprit. I tried to do this: using (StreamReader sr = new StreamReader(this._inFilePath,System.Text.Encoding.Unicode ,true)) instead of using (StreamReader sr = new StreamReader(this._inFilePath)) but I a...

How to include [ in xml element name

Is there any way to include the [ character in an xml element name? For example <AWSECommerceService.ItemSearch.ItemSearch.Request[0].SearchIndex>Electronics</AWSECommerceService.ItemSearch.ItemSearch.Request[0].SearchIndex> The reason for using this is that in SVG hidden request input values are specified using xml elements whose n...

jquery encoding problems

Hi, I have an a.js file written in windows-1251 charset. Now, I have a b.php script, that has header('Content-Type: text/html; charset=windows-1251'); in it. It also includes the a.js somewhere in the template. So I'm loading b.php into c.php (also headered that way) using jQuery.load. What I get is ??? instead of normal words in th...

What is the actual path of actions happening when I press a key on keyboard and it shows on a shell?

I am using a generic usb keyboard, Linux 2.6.27 with gnome desktop, gnome-terminal and bash shell. I am interested to know what happens in the software. How are special characters from my keyboard interpreted with some encoding to characters and where do the character pictures come from? ...

utf-8 vs Unicode

I have heard conflicting opinions from people - according to wikipedia, see here there are the same thing. Are they? can someone clarify? ...

mp4 encoding used by Google Video?

I have an HTC Touch HD on which mp4 videos downloaded from Google Video play the best, both in terms of video and audio quality. So I am wondering which settings exactly Google Video uses to encode videos into mp4, so that I can replicate it for videos not available on Google Video. A tool which reads an mp4 file and tells you all the e...

SourceGuardian Error

Error printed to screen: Fatal error: SourceGuardian Loader - script checksum error [12] Encoded script was modified in /home/user/public_html/domain_com/includes_encoded/params.php on line 2 Facts: Using a Hostgator host which have SourceGuardian loaders already in place, phpinfo also confirms they are loaded. Using demo version...

Is there a standard technique for packing binary data into a UTF-16 string?

(In .NET) I have arbitrary binary data stored in in a byte[] (an image, for example). Now, I need to store that data in a string (a "Comment" field of a legacy API). Is there a standard technique for packing this binary data into a string? By "packing" I mean that for any reasonably large and random data set, bytes.Length/2 is about t...

CURL import character encoding problem

Hi, I'm using CURL to import some code. However, in french, all the characters come out funny. For example: Bonjour ... I don't have access to change anything on the imported code. Is there anything I can do my side to fix this? Thanks ...