ascii

Jquery - Convert ascii chars back to HTML

I am reading data from an html file to load into a div. The problem I am having is, the program that writes the html files is converting <br /> to &lt;br /&gt; SO when I execute $('#items').load('/News/list.aspx'); it displays <br /> as a string on my page instead of reading it as a page break. I have tried to read the above file i...

How to convert ASCII value to a character in Objective-C ?

I was wondering if anyone has the following php function equivalents in Objective-C for iPhone development: ord() # returns the ASCII value of the first character of a string. chr() # returns a character from the specified ASCII value. Many thanks! ...

Binary to Ascii and back again

I'm trying to interface with a hardware device via the serial port. When I use software like Portmon to see the messages they look like this: 42 21 21 21 21 41 45 21 26 21 29 21 26 59 5F 41 30 21 2B 21 27 42 21 21 21 21 41 47 21 27 21 28 21 27 59 5D 41 32 21 2A 21 28 When I run them thru a hex to ascii converter the commands don't m...

What's the fastest way to strip and replace a document of high unicode characters using Python?

I am looking to replace from a large document all high unicode characters, such as accented Es, left and right quotes, etc., with "normal" counterparts in the low range, such as a regular 'E', and straight quotes. I need to perform this on a very large document rather often. I see an example of this in what I think might be perl here: ht...

feedparser fails during script run, but can't reproduce in interactive python console

It's failing with this when I run eclipse or when I run my script in iPython: 'ascii' codec can't decode byte 0xe2 in position 32: ordinal not in range(128) I don't know why, but when I simply execute the feedparse.parse(url) statement using the same url, there is no error thrown. This is stumping me big time. The code is as simple ...

How to convert from EBCDIC to ASCII in C#.net

I have a value in EBCDIC format "000000{". I want to convert it into a.Net Int32 type. Can anyone let me know what I can do about it?? So my question is given a string that contains a signed numeric in EBCDIC , what should I be doing to convert it into a .NET Int32. Thanks so much in advance! ...

What are the ascii values of up down left right?

Hey guys Was wondering what the ascii values of the scroll keys are? ( up down left right) ...

How to go about signing text in a verifiable way from within ruby in a simple yet strong & portable way?

Guys, I have been looking for a portable method to digitally sign arbitrary text which can be placed in a document and distributed while maintaining its verifiable origin. Here is an example: a = 'some text' a.sign(<private key>) # => <some signature in ASCII format> The contents of a can now be distributed freely. If a receiver want...

cscript - print output on same line on console?

If I have a cscript that outputs lines tothe screen, how do I avoid the "line feed" after each print? Example: for a = 1 to 10 WScript.Print "." REM (do something) next The expected output should be: .......... Not: . . . . . . . . . . In the past I've used to print the "up arrow character" ASCII code. Can this be done i...

The confusion on python encoding

I retrieved the data encoded in big5 from database,and I want to send the data as email of html content, the code is like this: html += """<tr><td>""" html += unicode(rs[0], 'big5') # rs[0] is data encoded in big5 I run the script, but the error raised: UnicodeDecodeError: 'ascii' codec can't decode byte...... However, I tried...

Hex characters in varchar() is actually ascii. Need to decode it.

This is such an edge-case of a question, I'd be surprised if there is an easy way to do this. I have a MS SQL DB with a field of type varchar(255). It contains a hex string which is actually a Guid when you decode it using an ascii decoder. I know that sounds REALLY weird but here's an example: The contents of the field: "38353334373...

How To Convert Arabic Number Ascii Code to String in ROR ?

I want to convert my English Numbers Pager to an Arabic one, I had something like <% @engnum = "0123456789" %> <% @arabnum = "٠١٢٣٤٥٦٧٨٩" %> <%= (@pagenumber).to_s.gsub(/./) {|s| @arabnum[@engnum.index(s)]} %> But this shows the ascii number not the actual number i need Any idea how to show the actual string (Number) Remember that...

ASCII 7x5 side-feeding characters for led modules

Hi! I am looking at the code for the font file here: http://www.openobject.org/opensourceurbanism/Bike_POV_Beta_4 The code starts like this: const byte font[][5] = { {0x00,0x00,0x00,0x00,0x00}, // 0x20 32 {0x00,0x00,0x6f,0x00,0x00}, // ! 0x21 33 {0x00,0x07,0x00,0x07,0x00}, // " 0x22 34 {0x14,0x7f,0x14,0x7f,0x14}, // ...

How many bytes is \n\r?

I have a .net app that is trying to ftp a file and we're ending up with 1 extra byte per line. My Line Separatro is Environment.NewLine which I beleive transaltes into \n\r. How many bytes is that? ...

How to write ASCII special characters in a .Net string

Suppose I want to use the ASCII special character FS(0x1C) in a .Net string, and then be able to format a byte array from that same string with the special character properly represented as a single byte, how would I do that? I can't seem to get my head around it. Thanks for any help you can give. ...

Any Suggestions for Opening a .asc (ASCII) file when Notepad doesn't do the trick?

I was attempting to open a raw data file (.asc) format with Notepad and am getting gibberish like the following: 1A120090900007 01Piedmont Federal Savings Bank 16 W 3rd St 00 02 1F120090900007 CCR134 +0000000000CCR180 Now, I tried searching around as to what this formatting might be but haven't been able to find anything (thou...

How to split line at non-printing ascii character in Python

How can I split a line in Python at a non-printing ascii character (such as the long minus sign hex 0x97 , Octal 227)? I won't need the character itself. The information after it will be saved as a variable. ...

simple question on C

I have this snippet of the code char *str = “123”; if(str[0] == 1) printf("Hello\n"); why I can't receive my Hello thanks in advance! how exactly compiler does this comparison if(str[0] == 1)? ...

PHP: How to create the uppercase MD5 value of the ASCII equivalent of a word?

I have a secret word (example. dirtydawg) And using PHP I want to create the uppercase MD5 value of the ASCII equivalent of the secret word. How do I do this???? ...

How do I convert filenames from unicode to ascii

I have a bunch of music files on a NTFS partition mounted on linux that have filenames with unicode characters. I'm having trouble writing a script to rename the files so that all of the file names use only ASCII characters. I think that using the iconv command should work, but I'm having trouble escaping the characters for the 'mv' com...