encode

Perl - Unicode::String sub need to add/convert for Latin-9 support

Part 3 (Part 2 is here) (Part 1 is here) Here is the perl Mod I'm using: Unicode::String How I'm calling it: print "Euro: "; print unicode_encode("€")."\n"; print "Pound: "; print unicode_encode("£")."\n"; would like it to return this format: € # Euro £ # Pound The function is below: sub unicode_encode { shift...

reading an objective C encoded object into a java class

I am writing a client server iPhone app. The server is J2EE based. I need to communicate the state of my client object (objective C) to the server. It is possible (and feasible) to say encode the objective C object, send the bytes to the J2EE server through a socket and create a Java object out of this stream. If so, can you kindly poin...

A code that is a word forwards & a different word backwards

Hello! For a present, I am trying to create a code that reads as a certain word forwards and a different word backwards. An example (0,1,2 are the available symbols): D = 02, E = 01, H = 201, L = 1, O = 211, R = 10, W = 11 Then the pair "HELLO"/"WORLD" would be 2010111211 HELLO 1121110102 WORLD I would like to generate a code ...

PHP: Very simple Encode/Decode string

Is there any PHP function that encodes a string to a int value, which later I can decode it back to a string without any key? ...

Is it possible to use FFMPEG as live encoder in pipe? (for live stream encoding)

So in my code I am building video frames, 720×480x24bit. I have in mind generating a large number of these, at 30fps, can I use ffmpeg to encode them in to MPEG2 or FLV or VP8 in kind of live mode and get them out in live mode by other programm I created by creating unnamed pipe like FramesGenerator.exe -| FFmpeg.exe args -| LiveE...

encode by php and decode by js

because of gfw(great firewall) in our country , I have to encode content within http transfer (https is better , but its a second choice). my way is use base64 encode by php and decode by js , then show in an iframe. but there's some problem in FF. is there any better way to show base64 encoded string in browser , or another way to enc...

How to create function for FFmpeg lib to encode frame into any (possible) format?

So how to create something which would have something like this in its api: Encoder = EncoderFormat(format name); // prepare encoder //...code for frames generation... now we want to encode frame!// EncodeFrame(const CImage* src, void* dest, int* is_keyframe, more args if needed); Is it possible? Please could any one provide simple ex...

Error in python: UnicodeEncodeError: 'gbk' codec can't encode character: illegal multibyte sequence

Hi, I want to get html content from a url and parse the html content with regular expression. But the html content has some multibyte characters. So I met the error described in title. Could somebody tell me how to resolve this problem? Thanks ...

Obfuscate Img Src in HTML

I need a way my image sources to be hard to read. Currently I have <img id="testImg" src="http://images.mydomain.com/sample.png /> and I need it converted to something like: <img id="testImg" src="javascript:xorDecode('3233435jh45h3232kl232kl2323', '32434mfr')"/> Is this possible? P.S. And I want to to so for around 200 KB variou...

Python Unicode Encode Error

I'm reading and parsing an Amazon XML file and while the XML file shows a ' , when I try to print it I get the following error: 'ascii' codec can't encode character u'\u2019' in position 16: ordinal not in range(128) From what I've read online thus far, the error is coming from the fact that the XML file is in UTF-8, but Python wants...

How Do I Encode a String in Base36 in PHP?

I have learned how to Base16 encode a string in PHP, but how do I Base36 encode and decode a string in PHP? Note I need this to make the string work in URLs. BONUS: And if you know how to compress the string slightly first before doing the Base36, that would be even cooler! :) ...

Android encode string as bitmap?

Is there a way to encode a string as a bitmap? Or a drawable? Thanks Chris ...

C# Convert Byte Array with nulls to string

All, I have a question about converting byte arrays with nulls to C# string. Here is an example of my byte array that I would like to convert to string. I expect to get a string with value SHKV [0]: 83 [1]: 0 [2]: 72 [3]: 0 [4]: 75 [5]: 0 [6]: 86 [7]: 0 How can I do it in C# ? Thanks, MK ...

Decode PEM (c#)

I've picked up some old code that I need to work with and I have the following function in C int pem64_decode_bytes(const char *intext, int nchars, unsigned char *outbytes) { unsigned char *outbcopy = outbytes; while (nchars >= 4) { char c1 = intext[0], c2 = intext[1], ...

GridView text encode ASP.NET

I have a gridview,i have a cell that contains follow text:"CONCLUÍDO". When I try to retrieve this text to a variable it comes with ISO LATIN CODE Of course it throws an exception. How can i remove this code from string? ...

set the implicit default encoding\decoding error handling in python

I am working with external data that's encoded in latin1. So I've add sitecustomize.py and in it added sys.setdefaultencoding('latin_1') sure enough, now working with latin1 strings works fine. But, in case I encounter something that is not encoded in latin1: s=str(u'abc\u2013') I get UnicodeEncodeError: 'latin-1' codec can't en...

Iphone : Application crash because of old encodeObject after updating

Currently, my Iphone application is not released yet. When I worked with the simulator/device and I modify my application to add more cache into the encodeWithCode: and initWithCoder: . The problem is that when the application is loaded, I tried to use some of the encoded object which is not existing before. For example: In the previous...

Adding encoded chars to the url breaks htaccess

Hello Here's my code: RewriteEngine on RewriteRule page/(.*) index.php?url=$1 [NC] When I access page/http://google.com/ = works just fine When I access page/http%3A%2F%2Fgoogle.com%2F = server reports 404 Martti Laine ...

Mime / Base 64 encoding

hi ! I need a way to encode a string to Mime/Base64 in Delphi 7 and PHP These two encoders must be compatible :) thanks in advance :) ...

encode/encrypt url parameter

I want to encrypt a URL variable so that the user can't see the information when it is passed. I've found several scripts online but none of them work. Most seem to lean toward using base-64. Could someone help me write a short script that would encode or encrypt and then reverse that in the next page? It doesn't have to be super sec...