Languages Visual Basic & VB.NET .Net Strings  

ANSI Encoding

download download  
important code information
author:
Paulo S. Silva Jr
minimum requirements:
ANSI Encoding description

Many of us misses the old days when a character was represented by a single byte. These days we need to worry about codepages, character translations, and the works... Well Unicode chars came to our rescue and saved us from having to worry about all these stuff. But, sometimes we need to represent a string as an array of bytes. The .NET Framework provides several encoding mechanisms: ASCII, UTF7, UTF8, Unicode. Did you notice something missing? The good old ANSI. ANSI, to those who don't know it, is a super set of ASCII each char is represented by a single byte (range 0-255). ANSI Encoding is system dependent, but extremly efficient when handling with strings. The class I'm providing fill this gap. It provides a fast way to convert from a string to an array of ANSI bytes. Each char in the string (or char array) is converted to byte through Microsoft.VisualBasic.Asc function. So, I think it will be easy to understand. It's multi threaded in order to acheive performance. In my tests I was able to convert an string about 1,000,000 chars long in less than 3 senconds. *UPDATE* Fixed a little bug when handling strings and/ou byte arrays that was multiple of 256 in length. Added a Project Sample (along with a new status bar control)



File List:
@PSC_ReadMe_3317_10.txt2Kb
ANSIEncoding.sln1Kb
ANSIEncoding.vbproj4Kb
AssemblyInfo.vb1Kb
Encoding.vb15Kb
Sample/0b
Sample/AssemblyInfo.vb1Kb
Sample/ProgressStatusBar.resx6Kb
Sample/ProgressStatusBar.vb4Kb
Sample/Sample.gif26Kb
Sample/Sample.vbproj5Kb
Sample/frmAboutBox.resx23Kb
Sample/frmAboutBox.vb47Kb
Sample/frmBinaryData.resx18Kb
Sample/frmBinaryData.vb13Kb

Similar code
Html2VB (Popularity: ) : Are you tired from manually encode html in vb code? It may happen that you want to insert a piece of html in your VB code for some purposes (making a parser, a mailto link, a html page, etc...), and ...
Advanced Installer Serial File Parser (Popularity: ) : This handy little app will parse serial code files created by Advanced Installer from Caphyon.
Email finder & Email validator (Popularity: ) : With these two functions, you can find all the emails in a string and validates these emails. The function are : FindEmail ValidEmail Function FindEmail let you find ALL the email in one text. To be found, the email must ...
English/Arabic Number-To-Text Class (Popularity: ) : Here is a very useful class: NumberToText. The class accepts a whole number (maximum 15 digits) and translates it into English/Arabic text. For example, the integer 145 is converted into "one hunderd forty five" in English.
I've used his code for ...

Word Guess/String builder stuff (Popularity: ) : I made this for someone in the VB .NET forums. It opens a list of words, puts a random word into a text box, and there's another text box for guessing the word. As you get it correct, it replaces ...
User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Rate me
supported os
stats
downloads 186
version
size in Kb 53
popularity   2548/7913374
user rating 6/10
ad


New Code
Popular Code