Все вопросы: [ascii]

132 вопросов

0
голосов
1ответов
837 просмотров

HAML & RoR: Auto-convert apostrophes, etc., to ASCII HTML entities?

Is there anyway to have HAML automatically convert all my apostrophe's ' to the HTML character entity equivalents ’ (’)? Ditto with all the other characters that one would want to convert (dashes, double-quotes, etc.) for better online readability. ?

14
голосов
4ответов
7541 просмотров

ASCII "graphics" library?

Is there a platform-independent C/C++ library that can draw simple "graphics" in pure ASCII in a console program? For example (VERY roughly) I could call a function in the library like rectangle(3, 6); to get the following output: ****** * * ****** Ultimately, I would love to be able to plo...

47
голосов
7ответов
59752 просмотров

Remove all non-ASCII characters from string

I have a C# routine that imports data from a CSV file, matches it against a database and then rewrites it to a file. The source file seems to have a few non-ASCII characters that are fouling up the processing routine. I already have a static method that I run each input field through but it per...

1
голосов
1ответов
917 просмотров

I don't understand how Assembly works with ASCII?

I have a program that's supposed to take values and print them back out. But when the user enters something like 12, (C in HEX) the program prints out some weird letter, that I think is the representation in ASCII. Is there a way to make it save those numbers as raw numbers? I'm doing the input a...

6
голосов
8ответов
2718 просмотров

What's the proper technical term for "high ascii" characters?

What is the technically correct way of referring to "high ascii" or "extended ascii" characters? I don't just mean the range of 128-255, but any character beyond the 0-127 scope. Often they're called diacritics, accented letters, sometimes casually referred to as "national" or non-English chara...

1
голосов
2ответов
8862 просмотров

prevent typing non ascii characters in a textbox

Since I think people have encounter it lots of time before I did and there may be some standart solution.. Can anybody give any hint direction how to prevent a user from typing non ascii characters in a textbox.

0
голосов
1ответов
246 просмотров

How do I convert an ascii code to the escaped 'screen friendly' view?

In C# .Net I'm looking to convert an ascii value (13, 16 etc) to its escaped view (eg \n, \r, \t etc) for a selector. Is there a built in way to do this or do I have to resort to using a look up table?

1
голосов
4ответов
26009 просмотров

Converting Decimal to ASCII Character

I am trying to convert an decimal number to it's character equivalent. For example: int j = 65 // The character equivalent would be 'A'. Sorry, forgot to specify the language. I thought I did. I am using the Cocoa/Object-C. It is really frustrating. I have tried the following but it is sti...

1
голосов
4ответов
1102 просмотров

Convert a-z to print out abcdef....z?

I want to be able to have a user input a-z or c-z or c-p or whatever and have it return the actual letters between those two. I figured I would have to use ASCII numbering so I could use these steps: Look for '-', if true Look at first char that was input(char a in a-z), find ASCII # Look at la...

4
голосов
1ответов
357 просмотров

^[[A character combination

On Unix, when I press up arrow key, it shows this string, but while scanf, it does not take it as input. Please explain how to take it as input. Can we something like compare the character by charater like first ^[ is Esc key and so on?

4
голосов
4ответов
446 просмотров

What is the best practice for creating libraries that support both Unicode and ASCII in C++?

I'm working on writing some libraries that will be used both internally and by customers and was wondering what the best method of supporting both Unicode and ASCII. It looks like Microsoft (in the MFC Libraries) writes both the Unicode and ASCII classes and does something similar to this in the...

1
голосов
3ответов
4557 просмотров

Replacing specific non-printable characters in huge files from linux command line

I need to replace the ascii characters SOH and STX (start of header and start of text, ascii characters 1 and 2, respectively) in some really huge text files as quickly as possible... Is sed the way to go? What does that command look like?

0
голосов
2ответов
122 просмотров

characters in an encrypted blob

what are the all possible characters that could appear in an encrypted blob? in another word, for example, could '&' be a character in an encrypted blob? what about '+'? why?

4
голосов
4ответов
33461 просмотров

UTF-16 to ASCII conversion in Java

Having ignored it all this time, I am currently forcing myself to learn more about unicode in Java. There is an exercise I need to do about converting a UTF-16 string to 8-bit ASCII. Can someone please enlighten me how to do this in Java? I understand that you can't represent all possible unic...

2
голосов
2ответов
1990 просмотров

Mysql ASCII vs Unicode

Just a quick one: Will SELECT ... WHERE name LIKE '...' query be faster if name column is ASCII rather then UTF-8? Thanks!

5
голосов
4ответов
5632 просмотров

Force C# to use ASCII

I'm working on an application in C# and need to read and write from a particular datafile format. The only issue at the moment is that the format uses strictly single byte characters, and C# keeps trying to throw in Unicode when I use a writer and a char array (which doubles filesize, among other...

0
голосов
1ответов
832 просмотров

Encoding problem with nordic characters

I'm trying to send HL7 messages to a receiver. The receiver now says they got question marks instead of 'ä' and 'ö'. What should I do? Right now I do it about like this: I initialize System.Net.Sockets.TcpClient and then Dim data(payload.Length) As Byte Dim stream As System.Net.Sockets.Network...

4
голосов
7ответов
4327 просмотров

Converting alphanumeric to ascii and incrementing

I'm stumped on how to convert 3 letters and 3 numbers to ascii and increment them by one...it's the old next-license-plate problem. Can anyone give me a nudge in the right direction?

6
голосов
10ответов
1866 просмотров

How to make next step of a string. C#

The question is complicated but I will explain it in details. The goal is to make a function which will return next "step" of the given string. For example String.Step("a"); // = "b" String.Step("b"); // = "c" String.Step("g"); // = "h" String.Step("z"); // = "A" String.Step("A"); // = "B" ...

3
голосов
2ответов
7301 просмотров

Character Encoding Issue - Strange Behaviour From Pound Signs (£) with UTF-8 IE6 / ASP / XML

I am having a very strange problem with pound signs displaying incorrectly (or not at all) on a web page. I am keying text in a textbox, which then gets (briefly) stored in XML before being displayed in a new IE(6) window. The worst part is that this is inconsistent. I have three different thin...

2
голосов
1ответов
16419 просмотров

MIPS how can you compare a character taken from input?

My program asks the user if the number he/she is thinking of is in a list. The user inputs a y or an n. How can I check if a user has entered y or n in assembly? Is it sufficient to put the user input into a register and branch if equal to 121 (decimal ASCII code for 'y') or branch if the value i...

9
голосов
2ответов
5172 просмотров

What is the char that is displayed over hidden passwords?

If you type a password in a modern application, it usually displays a nice neat black circle - where more traditional app's would use an asterisk. How is that character created? Is it an ascii value (if so I can't find it)? If not, how is it created?

0
голосов
1ответов
2305 просмотров

Need to decode ascii for xml file, into literal characters

I have an xml file that is being used on a third party system, and I have no control over the third party system that is using the xml file. The third party system fails because there are ascii in the xml file. For example, it fails when it sees , when it wants a single quote ’ ...

2
голосов
5ответов
1961 просмотров

Java - is it possible to read a file line by line, stop, and then immediately start reading bytes where I stopped?

I'm having an issue trying to parse the ascii part of a file, and once I hit the end tag, IMMEDIATELY start reading in the bytes from that point on. Everything I know in Java to read off a line or a whole word creates a buffer, which ruins any chance of getting the bytes immediately following my ...

0
голосов
2ответов
1956 просмотров

How Can I read a file with both ASCII and another encoding in Java cleanly?

I have a custom image file where the first block of data is ASCII meta data. I need to be able to read this ASCII meta-data part of the file with Java and know when it ends, and when the 'raw image data' in another encoding starts. I was thinking of reading all of the file into a byte[], and th...

9
голосов
9ответов
8283 просмотров

Quickest way (performance-wise) to turn a string into a byte[] array in C# using the ASCII character encoding

What's the fastest way to turn a string into a byte[] array in C#? I'm sending tonnes of string data through sockets and need to optimize every single operation. Currently I transform the strings in to byte[] arrays before sending using: private static readonly Encoding encoding = new ASCIIEnc...

0
голосов
3ответов
873 просмотров

PHP equivalent of VB.net character codes

So I am calling an API written in VB.NET from PHP and passing it some text. I want to insert into that text two linebreaks. I understand that in VB.NET, the character codes for a linebreak are Chr(10) and Chr(13). How can I represent those in PHP? TIA.

0
голосов
4ответов
2501 просмотров

Need to insert a 'dot' in textbox where the textbox is validated by using javascript to enter only numerical values

Here is the code which woks perfectly and validate to enter only digits in a TEXT BOX. Now i have a problem there. My problem is i need to enter decimal values there. So i need to enter 'DOT' in the TEXT BOX. This validation has been done by using ASCII values. I even use the ASCII value of 'DOT ...

6
голосов
6ответов
8920 просмотров

How to generate a random named text file in C#?

I have to make a loop to generate a 5 randomly-picked-letter string, and then create a text file under that name, lets say in C:// , how will I do that? Both the generating name and creating a file in the directory. I think I have to pick 5 random numbers from the ascii codes add them to an array...

53
голосов
6ответов
55601 просмотров

Getting an ASCII character code in Ruby using `?` (question mark) fails

I'm in a situation where I need the ASCII value of a character (for Project Euler question #22, if you want to get specific) and I'm running into an issue. Being new to ruby, I googled it, and found that ? was the way to go: ?A or whatever. But when I incorporate it into my code, the result of t...