I'm creating a link shortening service and I'm using base64 encoding/decoding of an incremented ID field to create my urls. A url with the ID "6" would be: http://mysite.com/Ng==
I need to also allow users to create a custom url name, like http://mysite.com/music
Here's my (possibly faulty) approach so far. Help in fixing it would be a...
Hi,
I would like to use PKCS7 encryption to encode a value together with Java and Java Servlet. Is there any available library and references to do the encryption? Any sample or tutorial that I could follow?
Thank you.
...
We've been looking for ways to HTML encode our JSP pages to counter XSS.
The OWASP site shows How_to_perform_HTML_entity_encoding_in_Java
The article talks about entity encoding the "Big 5" i.e.
21 {"#39", new Integer(39)}, // ' - apostrophe
22 {"quot", new Integer(34)}, // " - double-quote
23 {"amp", ...
I'm trying to display HTML source code in my NSDocument based application. However, it renders the page as Safari would show it.
Here's the code that I use to open HTML:
NSData*data;
NSMutableDictionary *dict = [NSDictionary dictionaryWithObject:NSHTMLTextDocumentType
...
Hi,
I was recently editing a Unicode-encoded text file that also includes Thai characters (alongside "normal" characters). For some reason, after each sequence of Thai characters, a new line appeared.
After some mucking around with C, trying to remove all newline characters, I fired up vim to inspect the file. Apparently, after each Th...
Is it mathematically feasible to encode and initial 4 byte message into 8 bytes and if one of the 8 bytes is completely dropped and another is wrong to reconstruct the initial 4 byte message? There would be no way to retransmit nor would the location of the dropped byte be known.
If one uses Reed Solomon error correction with 4 "parity...
I hear that you can copy paste text from MS word and send an email or post something and there will be an encoding problem.
I also heard from someone else its only a problem with webpages that cant handle unicode. Is it possible to have a doc that cannot be copy/paste to a webbrowsers/apps properly? (assuming its all text and only has a...
Hi. I need to get the Portuguese text content out of an Excel file and create an xml which is going to be used by an application that doesn't support characters such as "ç", "á", "é", and others. And I can't just remove the characters, but replace them with their equivalent ("c", "a", "e", for example).
I assume there's a better way to...
I'm building a simple client-server chat system.
The clients send data to the server and the server resends the data to all the other clients. I'm using the TcpListener and Network stream classes to send the data between the client and the server.
The fields I need to send are, for example: name, text, timestamp, etc. I separate them u...
I'm trying this code (on my local web server)
<?php
echo 'the word is / думата е '.$_GET['word'];
?>
but I get corrupted result when enter ?word=проба
the word is / думата е ����
The document is saved as 'UTF-8 without BOM' and headers are also UTF-8.
I have tried urlencode() and urldecode() but the effect was same.
When upload it ...
Has anyone implemented a good system for ensuring that output is properly HTML-encoded where it makes sense? Maybe even something that recognizes when output should be URL-encoded or JSON-encoded instead?
The lazy approach — just encoding all inputs — causes problems when you want to send those inputs to a database, or to a block of Jav...
With D and Tango library can I read and write in the ANSI encoding ?
...
I developp a Java application using Windows Desktop Search from which I can retrieve some information about files on my computer such as urls (System.ItemUrl). An example of such url is
file://c:/users/ausername/documents/aninterestingfile.txt
for "normal" files. This field give also urls of mail items indexed from Outlook or Thunderb...
The variable filepath which is a string contains the value Música. I have the following code:
wstring fp(filepath.length(), L' ');
copy(filepath.begin(), filepath.end(), fp.begin());
fp then contains the value M?sica. How do I convert filepath to fp without losing the encoding for the ú character?
...
I have an ASP.Net app that allows a user to write text into a Telerik RadEditor control and then send an email.
For some reason I'm sometimes getting strange characters showing up in the email that is generated.
For example if I put the word Test’s into the RadEditor box and send it... the email shows up with the text changed to: Testâ...
Hi all,
I have a set of data that contains garbled text fields because of encoding errors during many import/exports from one database to another. Most of the errors were caused by converting UTF-8 to ISO-8859-1. Strangely enough, the errors are not consistent: the word 'München' appears as 'München' in some place and also as 'MÃœnchen...
By default Rails allows users of our application to input non-utf8 data, such as: ¶®«¼
However when we attempt to retrieve the data from our database and render it in a template Rails incorrectly assumes that it is in UTF-8 format and throws an error.
ArgumentError: invalid byte sequence in UTF-8
What is the best way to handle this? ...
I have a program which runs on a console and its Umlauts and other special characters are being output as ?'s on Macs. Here's a simple test program:
public static void main( String[] args ) {
System.out.println("höhößüä");
System.console().printf( "höhößüä" );
}
On a default Mac console (with default UTF-8 encoding), this prin...
My company runs a video website. We currently make our content available via streaming, and download to Windows PCs with WMRM DRM. We're looking to make content available to download for Macs but would need to protect them with the FairPlay DRM system.
Is this something that we can do, or is FairPlay proprietary and only permitted to be...
I wanted to know how could I change the quality or color depth of an image and save it in PNG. The encoder method seems to work only for jpegs.
Thanks in advance.
...