encoding

Add windows encoding to Eclipse on linux

Hi, I have a legacy project which has all the source files, templates, properties written in cp1250 encoding. (Windows 1250 - central european). Recently I switched from Windows to Ubuntu and found out, that fresh installation of Eclipse 3.5 doesn't have cp1250 in neither project properties nor workspace settings. How do I install new en...

problems with encoding (php)

Hello! My site have a utf-8 encoding (Drupal). I use include function to integrate my page with 3rd party service. But this gives a bad result - bad encoding for include part of page. i try this, but this don't give any result: iconv("ASCII","utf-8",include("http://new.velo-travel.ru/themes/themex/spectrum_view.php?$QUERY_STRING")) ...

Base64 encoded string to file (c#)

I have a base64 encoded string stored in xml, I've already got a handle on the string, how can I write this base64 encoded string to a file, so that the file is completely usable on the file system? ...

ASP.NET Filename encoding while sending file

Hi I am sending a file from ASP.NET Page to the browser. To properly send a filename I am adding a header: Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=" + filename); The problem is that when file contains white spaces (e.g. "abc def") browser receives only "abc" p...

Transforming XML in ISO-8859-1 to HTML

I have an XML document that I'm transforming using XSL and then spitting out directly into an HTML document (all server side). Everything works OK functionally but special characters (specifically the © symbol -- these are ads and many have © symbols) don't show up right (IE shows ? and FF shows a diamond with a ? inside). Obviously so...

converting from base 10 to base 31 (working only with select characters)

I'd like to convert base 10 numbers to base 31 I would like to use only these characters: 23456789abcdefghjkmnpqrstuvwxyz As you can see, 5 characters are excluded (i don't need these): 1 0 o l i The function I have now is below but of course it doesn't work. When 2 is input it outputs 4. The output for tenTo31(2) should be 2 functio...

Change Website Character encoding from iso-8859-1 to UTF-8

About 2 years ago I made the mistake of starting a large website using iso-8859-1. I now am having issues with some characters, especially when sending data to the server using ajax. Because of this, I would like to switch to using UTF-8. What issues do you see coming from this? I know I would have to search the site to look for ch...

How do I encode a file name for download?

When the file name is "Algunas MARCAS que nos acompañan" ASP.NET MVC raise an System.FormatExceptin when I try to download that file. But if the file name is "Asistente de Gerencia Comercial" it doesn't. I guess this is because something related to UTF-8 encoding, but I don't know how to encode that string. If I'm right, how can I enc...

Why http post parameter dissapears after Content-Type changed?

I'm making an http post to an url. When using WebClient or WebRequest it all works fine, unless I change the WebRequest.ContentType propertie. What I'm missing here? As suggested here I'm trying this: using (WebClient client = new WebClient()) { NameValueCollection fields = new NameValueCollection(); fields.Add("q...

php's $_SERVER['REQUEST_URI '] encoding problem ??

When I output $_SERVER['REQUEST_URI']; on: http://localhost/tools/?tool=cs&sub=1 I get: /tools/?tool=cs⊂=1 Is there other solution to get /tools/?tool=cs&sub=1 besides using & instead of & ? ...

linux shell scripting: hex string to bytes

Lets say that I have a string "5a". This is the hex representation of the ASCII letter 'Z'. I need to know a linux shell command which will take a hex string and output the binary bytes the string represents. So if I do echo "5a" | command_im_looking_for > temp.txt can I open temp.txt, I will see a solitary letter Z. ...

Encryption/Encoding Algorithm

I have an unencrypted/unencoded string - "565040574". I also have the encrypted/encoded string for this string - "BSubW2AUWrSCL7dk9ucoiA==". It looks like this string has been Base64ed after encryption, but I don't know which encryption algorithm has been used. If I convert "BSubW2AUWrSCL7dk9ucoiA==" string to bytes using Convert.FromBa...

How to post form data on an UTF-8 page to a western european (ISO) page

I need to post a form on a new website which is UTF-8 encoded. The problem is - i need to post it to a legacy site encoded with western european (iso). Certain characters gets messed up in the post (like danish special characters). It is not possible to change the character encoding on the legacy website as it would definately break stu...

Unicode Encoding and decoding issues in QRCode

I am trying to generate UTF-8 QRCode so that I can encore accents and Unicode characters. To test it, I am using many decoding solution : http://zxing.org/w/decode.jspx - The zxing project also used in Android http://www.drhu.org/QRCode/QRDecoder.php - a PHP Decoder http://zbar.sf.net - The ZBar bar code reader - OpenSource and C proj...

How to parse xml file that is encoded with another encoder different from utf-8 with using NSXMLParser in objective-C?

Is there a way to parse xml file that is encoded with windows-1254 with using NSXMLParser? When i try, didStartElement method not called. ...

Setting Quercus db connection encoding to UTF-8 (urgent problem and need your great help)

Now we are going to use java class in my website developed with PHP + mySQL. I came to know Quercus and it worked well. But only problem is encoding. Quercus is providing ISO8859 encoding in default and all database in UTF-8 is not shown properly like ???. If anybody know the way to set Quercus db connection encoding to UTF-8, please he...

Converting Unicode strings to escaped ascii string

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 Encoding available in C#, converts the π character into "?". I need to preserve that character. ...

How to delta encode a C/C++ struct for transmission via sockets

Hi, I need to send a C struct over the wire (using UDP sockets, and possibly XDR at some point) at a fairly high update rate, which potentially causes lots of redundant and unnecessary traffic at several khz. This is because, some of the data in the struct may not have changed at times, so I thought that delta-encoding the current C str...

jQuery.post and encoding

I have a form in a webpage, where the user can enter any arbitrary html. Once he clicks submit, I am sending the content to the webserver via AJAX using jQuery.post(). But for certain HTML, I am getting this response from the server HTTP/1.0 400 Bad Request Content-Type: text/plain Date: Mon, 26 Oct 2009 05:28:00 GMT BAD REQUEST: Bad...

JavaScript bookmarklet and URL encoding

Fully disclosing that I do not know Javascript, I'm trying to get this Javascript: javascript:location = 'http://validator.w3.org/check?uri=' +escape(location)&doctype=Inline&charset=detect+automatically&ss=1&group=0&user-agent=W3C_Validator/1.654'; to work as a Bookmarklet in order to send a URL of this format: http://validator.w3.o...