I wonder which method would be better to convert const char* string to NSString.
I found there are some facts.
[NSString stringWithCString:length:] is kind of deprecated.
[NSString stringWithCString:encoding] may be used for my purpose
But I want to convert with length AND encoding(because I want to make that fine if I have some Non-...
I'm wondering if this is possible to be done either in JavaFX / SilverLight:
Download an MPEG1 file from a remote server and then convert it to MPEG4 using the client's processing power (to reduce load from server)..I suppose this would be running as an applet on the browser, but my question is, can this be done using either of those te...
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...
I have coded a pretty nice class and I'd like to install it on the clients server without risking them taking the code and not paying me.
If possible, a method where I have the "key" on my server, and encrypt the source code on the clients server with that key and some how code the method for retrieving the key from my server into it, s...
What is happening with Russian letters when sending via PHP request to ... a mail, by e.g.?
the "hardcoded" russians letters are displayed properly, but from the Form's textboxex with hieroglyphs:
HTML page:
<tr>
<td style="width: 280px">Содержание работ</td>
<td><input type="text" id="workContent"/></td>
</tr>
PHP page:
$WorkCont...
With PHP, which function is best to be used with $_GET[] values to make them browser safe?
I have read up on a few htmlspecialchars() and htmlentities(). Should one of those be used or is there another function that would work better?
...
I have an issue with Sharepoint Designer. Every time I put an accent in its HTML entities form: either é or é, Sharepoint Designer changes it to é upon Check In and isn't shown when accessing the page on Internet Explorer.
Is it an encoding problem? What can I do to avoid it?
...
This is a real shot in the dark, however maybe someone had a similar issue. Some console apps are being invoked by either SQL Server 2008, or Autosys (job schedule) under Windows Server 2008; output results of execution are being saved into .txt files. Every so often, with no definite pattern as far as I can tell saved output is display...
In the past, I used to work with windows-1255. Now my new page is written in UTF-8. When I send a query to DB (MS-Access), I get no results. The query on the URL shows the same like I type in by myself, but in this case (typing) I get results. How can it happen that I see the same URL on my IE and get the results and the other (that come...
The site from where I'm calling the window.open() function is in UTF-8, using the <meta> tag, everything works well, but once I call the function and open another window with the same tag, the new window shows weird characters even thought in page info it shows that the encoding stays the same (UTF-8).
This is the same problem as mine:
...
Hi!
I have this bit of code:
...
var aData = request.responseXML.getElementsByTagName('data')[0];
var sDescription = aData.getElementsByTagName('description')[0].firstChild.data;
alert(escape(sDescription));
document.getElementById('tempLabourLineDescription').value = sDescription;
...
sDescription is outputting: SUPPORT ASSY-FUEL ...
Hello
Does anybody know how to get the encoding of a file in Python. I know that you can use the codecs module to open a file with a specific encoding but you have to know it in advance.
import codecs
f = codecs.open("file.txt", "r", "utf-8")
Is there a way to detect automatically which encoding is used for a file?
Thanks in advance...
I get strings in different encodings (ID3 tags).
I use e.g. new String( bytes, "UTF-16LE" ) to decode them.
On my device (Motorola Milestone) and in the emulator, this works fine.
But some users complained they get results like "T i t l e n a m e".
I've tried the Sun codepage names instead (e.g. "UnicodeBigUnmarked"), with the same res...
Many sites advise to encode email links in Unicode, to prevent robots from getting your contact email address.
You get something like :
<a href="mailto:myemail@google.com">myemail@...
Hello! I'm getting my text from a textbox from code-behind using control.Text()
but I'm not getting the proper characters, I want "ÅÄÖ". Must be some problem with the text encoding but I've already checked my encoding settings in VS. Someone??
...
This is more of a computer science / information theory question than a straightforward programming one, so if anyone knows of a better site to post this, please let me know.
Let's say I have an N-bit piece of data that will be sent redundantly in M messages, where at least M-1 of those messages will be received successfully. I am inte...
this is an extension of my other question about redundant encoding, but the two are different enough that I wanted to split it up.
What if I have a counter that increments once per tick, and at erratic rates a message will be sent out containing information about the counter. If I know that the interval between messages will be at most ...
Which NSString encoding method will percent escape the ampersand (&) character correctly into %26?
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding
gets the spaces (%20) and other baddies but ignores ampersands!?!
...
NSString *theString = @"a %C3%B8 b";
NSLog(@"%@", theString);
NSString *utf8string = [theString stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding]
NSLog(@"%@", utf8string);
const char *theChar = [utf8string UTF8String];
NSLog(@"%s", theChar);
This logs the following:
'a %C3%B8 b'
'a ø b'
'a √∏ b'
The problem i...
Let's say you have a List<List<Boolean>> and you want to encode that into binary form in the most compact way possible.
I don't care about read or write performance. I just want to use the minimal amount of space. Also, the example is in Java, but we are not limited to the Java system. The length of each "List" is unbounded. Therefo...