encode

Delphi: Encoding Strings as Python do

Hi! I want to encode strings as Python do. Python code is this: def EncodeToUTF(inputstr): uns = inputstr.decode('iso-8859-2') utfs = uns.encode('utf-8') return utfs This is very simple. But in Delphi I don't understand, how to encode, to force first the good character set (no matter, which computer we have). I tried this te...

Convert int to ascii and back in Python

I'm working on making a URL shortener for my site, and my current plan (I'm open to suggestions) is to use a node ID to generate the shortened URL. So, in theory, node 26 might be short.com/z, node 1 might be short.com/a, node 52 might be short.com/Z, and node 104 might be short.com/ZZ. Something like that. And when a user goes to that U...

Include url inside url

I want to use the following format of my url: http://localhost/{url}/{options}/{hash} But since the url will be very strange with a url inside a url, how would I encode that? I was thinking of encoding it in hex, since url encoding in .net gave me some strange result that didn't work inside a url. But I don't really know what would ...

Encoding issue in the web page

Hi , There is an encoding issue in the web page means it showing some special characters in the browser(Cinéma). content is in ISO, web page is rendering in UTF-8. some articles are displaying properly,bcz those are in UTF encode.some of the articles are shows the encoding issue like Cinéma in Perl 5. Can any once help me out for t...

excel with Japanese(wide) fonts

I was working on parsing an excel file having japanese files in some of the cells. By using Spreadsheet::ParseExcel (Ver. 0.15) (which I know is older than current version) some of the cells with below characters <設定B-1コース> are appearing as in print Dumper $oWkc->{_Value}; $VAR1 = "\x{ff1c}\x{8a2d}\x{5b9a}B-\x{ff11}\x{30b3}\x{...

encodeWithCoder Not getting called

I have an object (testSession) that complies to NSCoder and when I use: [NSKeyedArchiver archiveRootObject:testSession toFile:filename]; It has: @interface Session : NSObject <NSCoding> { and has encodeWithCoder: and initWithCoder: functions. Neither are getting called. What would prevent this? - (void)encodeWithCoder:(NSCoder *)e...

Java Servlet getParameter for a param that is a URL

I am building a site which submits a url to a servlet for analysis purposes. On the client side, I submit the url as a parameter that is encoded. For example... Submit: http://www.site.com Goes to: http://localhost/myservlet/?url=http%3A%2F%2Fwww.site.com On the server side, I have my servlet request the parameter like so... String u...

How to convert string to base64 ASCII Embedded in c

Possible Duplicate: How do I base64 encode (decode) in C? I am trying to convert an int into an ASCII byte array and then encode the byte array as a base64 string. I see a few posts on how to do this in C# and Java, but I want to do this in C. I'm doing this in windows, using MS Visual Studio. Is there a function provide...

Delphi, soap and wrapping values in cdata

Hi, We have imported a wsdl from a thirdparty. This gives us a set of interfaces with methods to call, and classes for parameters and returnvalues. Now, the thirdparty have told us that one of the widestring values that we pass has to be wrapped in a CData-section. In Delphi 2007, is there a way of controlling how a given property is ...

How can I convert (encode) RGB buffer to JPEG in plain C?

I would expect that there's some sort of library that I can use in this fashion: int* buffer[720*480]; // read in from file/memory/network stream raw_params params; params.depth = 16; params.width = 720; params.height = 480; params.map = "rgb"; params.interleave = JPEG_RAW_INTERLEAVE_OFF; jpeg_encode(buffer, params) But I can't seem ...

UTF-8 to Unicode using C#

Help me please. I have problem with encoding response string after GET request: var m_refWebClient = new WebClient(); var m_refStream = m_refWebClient.OpenRead(this.m_refUri); var m_refStreamReader = new StreamReader(this.m_refStream, Encoding.UTF8); var m_refResponse = m_refStreamReader.ReadToEnd(); After calling this code my string ...

Encode email with PHP then decode with JS

I'm working on a website that has many business profiles with their contact information which also include email addresses. Obviously I don't want to output the plain email addresses in the source due to spam. Could do mrsmith[at]gmail.com or obfuscate with ASCII but these solutions aren't ideal, not 100% foolproof. The profiles do have...

flash as3 string encode decode

I want to encode / decode a string in AS3: var string:String = "This is an text"; encode(string) will give for example: "yuioUasUenUwdfr" decode(encoded(string)) will give: "This is an text"; It does not have to be secure or anything. Thnx! ...

Encode GIF in J2ME

Hi, I have an Image object in J2ME and I'd like to enconde it to GIF. I've already found a JPEG and PNG encoder as well, but I'm wondering if it's possible to encode my Image in the GIF format, returning it's byte array. I'm doing something like this: ... Image img = Image.createImage(width, height); Graphics graphics = img.get...

What is the equivalent of JavaScript's decodeURIcomponent in PHP?

I have some string with unicode characters and was endcoded with javascript decodeURIcomponent.But i dont find any equivalent in php to decode it.Is there any solution for this? ...

Voice encoding in Flash/AS3

The only library I found is "shineMP3_alchemy.swc" that encodes to MP3 but I would like to encode in the Speex , Vorbis or some other voice optimized codec. ...

Convert multiple files using Mercurial's Filter System

Is it possible to convert multiple, on-each-other-depending files using a filter? E.g. instead of converting a.zip to a.txt and b.zip to b.txt is it possible to convert a.zip AND b.zip to ab.txt? The problem is that a.zip and b.zip can't be converted individually, since a.zip contains data which is needed for the conversion of b.zip. ...

Has PHP a function to ENCODE a MySQL Table into XML like ...?

<?xml> <table> <row> <columnA>ValueA</columnA> <columnB>ValueB</columnB> <columnC>ValueC</columnC> <columnD>ValueD</columnD> <columnE>ValueE</columnE> </row> <row> <columnA>ValueA</columnA> <columnB>ValueB</columnB> <columnC>ValueC</columnC> <columnD>Valu...

How do I encode a single quote so it shows up in the label of a Fusion Chart's value?

I'm getting an 'Invalid XML Data' error for any Fusion Chart which contains a ' (ie. single quote) in the label name for data. This happens even when I encode/escape the single quote. Try the following Chart Data: Obviously when unescaped (as such) we should see an error <chart shownames='1' caption='Registrant Types'> <set value...

[Python 3] Base64 decode until there is no Base64

Hello from Germany So my problem is something very simple, i think. I need to Decode Base64 until there is no Base64, i check with an RegEx if there is some Base64 but i got no Idea how to decode until there is no Base64. In this short Code i can Decode the Base64 until there is no Base64 because my Text is defined. (Until the Base64 D...