encode

Help to convert this PHP code to VB.NET code

Hi I have a code to send XML via POST. But this code is in PHP and I need it in VB.NET. Any help to convert this code? $XMLFile= (here i have created the xml file. XML is encoded ISO-8859) $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"URL WHERE I SEND XML"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch,CURLOPT_RETURNTRANSFER...

Encode value as base64

I'm trying to write a customization in Lyris ListManager (10.2). The language is TCL, which I know very little about. We need to encode a value as base64 (or really, anything that obfuscates a querystring parameter), but I can't seem to figure out how. Is there a command native to TCL to do this? ...

encode string to utf8

Hi, How can easily encode a string to utf8 using .NET (VB or C#)? For instance I need to encode a string like "This (is) my string" the result should be a string "This+%28is%29+my+string". TIA JP ...

How can I encode reserved XML characters in actionscript?

I am writing a business app in Flex that uses web services to communicate with a middle tier. The web services accept and return messages in XML format. In many cases, I need to be able to allow the user to type something like the following into a field in the app, which in turn will be added as an element in an XML payload bound for a...

make python replace un-encodable chars with a string by default

I want to make python ignore chars it can't encode, by simply replacing them with the string "<could not encode>". E.g, assuming the default encoding is ascii, the command '%s is the word'%'ébác' would yield '<could not encode>b<could not encode>c is the word' Is there any way to make this the default behavior, across all my proje...

browser url encoding different that java's URLEncoder.encode

I have a url like this: product//excerpts?feature=picture+modes when i access this url from browser, the backend receives the request as: "product//excerpts?feature=picture+modes" At the web server end, i am using + as a separator. so feature=picture+modes means there are 2 features: picture and modes I have created and automated scri...

ajax post special characters

How do I pass a a large string containing characters like '%' and '&' to my php page through ajax post? In other words how to javascript-encode them and php-decode them? ...

python foreign character in csv

I have a little csv which contains foreign characters, like Chinese. How can I display them in Chinese instead of those \xa5\\xa4\ string??? Thanks ...

Zend Framework URI space encoding in PHP and Javascript

I've a Zend Framework URI like /controller/action/var1/value1/var2/value2 . Value2 has a space character in it. How should I encode it in PHP? When I use urlencode with value2, this converts space into '+' instead of '%20f'. Is that ok? This value2 is also added to a href location by javascript on client side. I'm using escape functio...

MySQL > JSON, Causing errors with URL's

I have this code converting a mysql query to json: $sth = mysql_query('SELECT * FROM `staff` ORDER BY `id` DESC LIMIT 20') or die(mysql_error()); $rows = array(); while($r = mysql_fetch_array($sth)) { $rows[] = $r; } print json_encode($rows); Works great, but i have in my database, a url field, here is a sample json row: {"0":"4"...

Matroska size problem?

I have size problem – I’ve done a program in graph edit to encode video from virtual camera. I save it into Matroska and AVI (for encoding to H264 I use x264) 5 seconds of .mkv (H264) weight 2 mb while 5 seconds of .avi (H264) weight 200 kb. 5 minutes of .mkv (H264) weight 2.1 mb while 5 minutes of .avi (H264) weight 5 mb. Is it conn...

Fast alternative to java.nio.charset.Charset.decode(..)/encode(..)

Anybody knows a faster way to do what java.nio.charset.Charset.decode(..)/encode(..) does? It's currently one of the bottleneck of a technology that I'm using. [EDIT] Specifically, in my application, I changed one segment from a java-solution to a JNI-solution (because there was a C++ technology that was most suitable for my needs than...

Is it possible to encode a video on client machine with a click of a button on the browser?

Hi guys, I have this strange request from my client and they want to perform video encoding using the clients' machine instead of the server to reduce the workload of the server. I wonder if this is possible? For example I have this video and then I click on the download button to download, which will download the video in its current f...

PHP code safeguard technique for Remote call, scenario based

hi, I am thinking about safeguardimg my php code in a different way for my project, but it may be childish method. Please let me know alternative or pros and cons of this method. Both client and server has LAMP. Client system holds client sensitive data, which will not be shared to the server. Client will have Auth key to access serve...

Encrypt printable text so result is still printable (can be typed)

I want to encrypt some info for a licensing system and I want the result to be able to be typed in by the user. Update: This operation must be reversible (decrypt-able) E.g., Encrypt ( ComputerID+ProductID) -> (any standard ASCII character that can be typed. Ideally maybe even just A-Z). So far what I did was to convert the encrypted t...

NSString converting percentage characters

Hi, I have an NSString *str = @"T%B3%C3%83"; where %C3 represents A with an umlut (I think), %B3 an m, %83 a superscript 3... What is the best way to convert these percentages into the actual characters. Thanks. ...

Encoding and decoding

I am looking to encode some text that could be 1 charchter long or or 10,000 or infinite and decode (reverse the algorithm). I am looking something like MD5 on PHP, but reversable, as MD5 is one way. This could be server side or JavaScript. If both, then it's even better. ...

Perl - read file with encoding method?

Hi, im not too good when it comes to encoding and I am wanting to figure out how to return data as the same encoding it started with... I have a file with some characters in such as '»' by the time I have edited and and inserted into database they have turned into &raquo. decode_entities() does nothing and encode_entities encodes the c...

How is the @encode compiler directive implemented in Objective-C?

Can anyone explain how @encode works to extract the datatype elements present in a given object, struct, or datatype into a type definition to be used as a class descriptor for instantiation? Or maybe a pointer to some resources for learning about the implementation of new preprocessor directives? ...

How would I implement something similar to the Objective-C @encode() compiler directive in ANSI C?

The @encode directive returns a const char * which is a coded type descriptor of the various elements of the datatype that was passed in. Example follows: struct test { int ti ; char tc ; } ; printf( "%s", @encode(struct test) ) ; // returns "{test=ic}" I could see using sizeof() to determine primitive types - and if it was a full ...