encoding

iphone: Getting xml with UIWebView?

Hi guys I have the following url http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured?&start-index=1&max-results=15&v=2 I am trying to load it in UIWebView and then use javascript to get its contents, and parse it with NSXMLParser. My code looks like that: -(void)startDownloading{ NSString *urlStr = [NSS...

translate data file with odd Hebrew encoding

I have a binary data file, in a format used by a relatively ancient program, which I am trying to convert into something sane. With the help of a Hex editor I have basically worked out the file format except that it contains Hebrew characters with an odd encoding. All characters are 8 bits. The "standard" 27 consonants (including "fin...

MVC HttpUtility.UrlEncode

Hi All, i am attempting to use HttpUtility.UrlEncode to encode strings that ultimately are used in URLs. example /string/http://www.google.com or /string/my test string where http://www.google.com is a parameter passed to a controller. I have tried UrlEncode but it doesn't seem to work quite right my route looks like: routes.Map...

Why is special character coming out strange from MySql db after I changed to sessions?

I have a classified website, and I recently changed the insertion of classifieds to use php Session variables instead of alot of POST and FORMS... So first BEFORE changing to Sessions, it worked nice and all special characters showed up correctly. Now that I changed to SESSIONS, I get funny characters instead of the special characters....

Encoding of Process.StartInfo.Arguments

I have a .Net application that fires up a process, passing a long argument list through Process.StartInfo.Arguments. The new process can only handle 8-bit characters in the arguments passed to its main() function. Therefore, I've encoded the string in Process.StartInfo.Arguments so that each character is an 8-bit value. The problem is...

Solving the unicode output in Python

Hi, I have written some code which sends queries to google and returns the query results. Apparently the contents which are retrieved are in unicode format, so when I put them in a list for example and print this list (the whole list together and not member by member) an annoying extra 'u' is always behind all of the members in this list...

In base64 what happens if the character you want to encode isn't A-Z, a-z , + or /

In base64 what happens if the character you want to encode isn't A-Z, a-z , + or /? If I wanted to encode a URL in base64 which has a colon (:) in it what would happen since its not in the base64 index. ...

Octal Escape in Java result in wrong byte value, Encoding problem?

According to this documentation ( http://java.sun.com/docs/books/jls/third_edition/html/lexical.html , 3.10.6) an OctalEscape will be converted to an unicode character. Now I have the problem, that the following code will result in a 2 byte Unicode character with wrong informations. for (byte b : "\222".getBytes()) { System.out.for...

Get CURRENT_FILE_ENCODING for a python file or environment

How can I tell the encoding of the source file from inside a running python process, if it is even possible? ...

Python: in what encoding is sys.argv?

In what encoding are the elements of sys.argv, in Python? are they encoded with the sys.getdefaultencoding() encoding? sys.getdefaultencoding(): Return the name of the current default string encoding used by the Unicode implementation. PS: As pointed out in some of the answers, sys.stdin.encoding would indeed be a better guess. I...

hummingbird, encoding

i want to write a little code with hummingbird, is there anybody in this site that can say me some on... ...

Localizable.strings woes

My Localizable.strings file has somehow been corrupted and I don't know how to restore it. If I open it as a Plain Text File it starts with weird characters that I can't copy here. If I leave the file be the app builds. If I make any changes either the values aren't interpreted properly or I get an error at compile time. Localizable.s...

Open Source PHP Encoder?

After looking into both IonCube and Zend Guard I realized that I can not afford these products right now. So my question is are there any widely excepted stable open source PHP Encoders? Either google has failed me, they don't exist, or I'm searching for the wrong things. ...

How do you decode a binary encoded mail message in Python?

I'm writing a Google App engine app that processes incoming mail, and here's the code I'm currently using to process mail messages: for content_type, body in email_bodies: #8bit bug in mail messages - see bug report here #http://code.google.com/p/googleappengine/issues/detail?id=2383 if body.encoding == '8bit': body.encoding = '7bit...

email encoding and sending through SMTP - Ruby

Hi Everyone, I have run across an interesting problem. I am sending email with attachments through the NET::SMTP class in ruby through Apple's me.com SMTP servers and I am running into some funny issues. I am trying to send a series of jpg files through the SMTP server. I am encoding them in ruby and when I send to another me.com emai...

Java: convert UTF8 String to byte array in another encoding

I have UTF8 encoded String, but I need to post parameters to Runtime process in cp1251. How can I decode String or byte array? I need smth like:.bytesInCp1251 = encodeTo(stringInUtf8, "cp1251"); Thanks to all! This is my own solution: OutputStreamWriter writer = new OutputStreamWriter(out, "cp1251"); writer.write(s); ...

ASCIIEncoding In Windows Phone 7

Is there a Way to use ASCIIEncoding in Windows Phone 7? Unless im doing Something Wrong Encoding.ASCII Doesn't Exist and I'm needing it for C# -> PHP Encryption (As PHP Only Uses ASCII in SHA1 Encryption). Any Suggestions? Thanks. ...

filename encoding issue

I am getting a file with a faroese name and trying to save it in a PHP script: 2010_08_Útflutningur.xls In Ubuntu 10.04 LTS is saving it as : 2010_08_�tflutningur.xls (invalid encoding) I've installed and run utf8-migration-tool, but with no effect. Is this a ubuntu error that I can fix or I just have to give up and modify the nam...

Compressing a run of 10 to 20 highly redundant images with which compression library?

I am going to be generating images once every minute or so from a low resolution camera. I would like to take runs of 10 to 20 images and compress them for transmission over a very bandwidth limited channel. I have looked at using x264 but it feels like over kill. Given that my images are 320x240, with high level of redundancy between ...

Encoding video for android device

What is the suggested video/audio codec for encoding videos for android devices which works on most of the devices?I tried using H.264/AAC, but the output mp4 only works in android 2.2, devices running older os versions says "this video can not be played". I am using normal progressive playback (via http) i.e. no streaming servers etc. S...