473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

convert letters

I was wondering if someone in here knows if it is possible to convert a
letter (a, b, c....) to the ISO Latin-1 Character Set Decimal code?
a= a
b=b
c=c
I know it is possible but i was looking for a way to do it by using the
Framework. Some utility that returns the Decimal code from the mentioned
Character Set if input is a character like 1, 2..a, b ... and so on.

Best regards
Trond
Nov 17 '05 #1
4 2584
As I recall, the character codes are composed of hex values.

search: ascii to hex c#
search: ascii to hex vb.net

There are a lot of documents showing the many techniques and variations and
there may be a unique class that can be used.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/

"Trond Hoiberg" <tr***@montanis.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
I was wondering if someone in here knows if it is possible to convert a
letter (a, b, c....) to the ISO Latin-1 Character Set Decimal code?
a= a
b=b
c=c
I know it is possible but i was looking for a way to do it by using the
Framework. Some utility that returns the Decimal code from the mentioned
Character Set if input is a character like 1, 2..a, b ... and so on.

Best regards
Trond

Nov 17 '05 #2
The reason why i asked is that Browsers can understand a and "convert"
it to a. Most of us has used &nbsp; wich is also from ISO Latin-1 Character
Set.
If you type in a in help in vs2003 you get the entire table.
Best regards
Trond

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
As I recall, the character codes are composed of hex values.

search: ascii to hex c#
search: ascii to hex vb.net

There are a lot of documents showing the many techniques and variations
and there may be a unique class that can be used.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/

"Trond Hoiberg" <tr***@montanis.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
I was wondering if someone in here knows if it is possible to convert a
letter (a, b, c....) to the ISO Latin-1 Character Set Decimal code?
a= a
b=b
c=c
I know it is possible but i was looking for a way to do it by using the
Framework. Some utility that returns the Decimal code from the mentioned
Character Set if input is a character like 1, 2..a, b ... and so on.

Best regards
Trond


Nov 17 '05 #3
ASCIIEncoding c = new ASCIIEncoding();
byte [] x = c.GetBytes("Hello World");
Encoding.Convert(Encoding.Default, Encoding.GetEncoding("Windows-1252"), x,
0, 1);

foreach(byte s in x)
{
MessageBox.Show(s.ToString());
}

"Trond Hoiberg" wrote:
I was wondering if someone in here knows if it is possible to convert a
letter (a, b, c....) to the ISO Latin-1 Character Set Decimal code?
a= a
b=b
c=c
I know it is possible but i was looking for a way to do it by using the
Framework. Some utility that returns the Decimal code from the mentioned
Character Set if input is a character like 1, 2..a, b ... and so on.

Best regards
Trond

Nov 17 '05 #4
Trond Hoiberg <tr***@montanis.com> wrote:
I was wondering if someone in here knows if it is possible to convert a
letter (a, b, c....) to the ISO Latin-1 Character Set Decimal code?
a= a
b=b
c=c
I know it is possible but i was looking for a way to do it by using the
Framework. Some utility that returns the Decimal code from the mentioned
Character Set if input is a character like 1, 2..a, b ... and so on.


The first 256 values of Unicode *are* ISO Latin 1, so you just need to
convert from char to int - which is a widening conversion, and so done
implicitly. For instance:

int a = 'A'; // a is now 65.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: Hallvard B Furuseth | last post by:
Has someone got a Python routine or module which converts Unicode strings to lowercase (or uppercase)? What I actually need to do is to compare a number of strings in a case-insensitive manner,...
4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
2
by: Ebi | last post by:
Hi I'm writing a project in C++ borland 5; and I need a function that get a string or char* variable and convert all of the small letters to the capital. please help me. -- Sincerely Yours...
7
by: Joris De Groote | last post by:
Hi, I have a 1 dimensional table byte with a number af characters in ASCII code. How do I convert those ASCII codes to real letters? Thanks
5
by: Niclas | last post by:
Hi I'm having trouble to work with the special charcters in swedish (Å Ä Ö å ä ö). The script is parsing and extracting information from a webpage. This works fine and I get all the data...
3
by: marishka88 | last post by:
I'm using Turbo C++ and I'm trying to convert letters to specified letters using single-dimension arrays. Lets say I enter the name MATT into the program and it'll cipher the name to HYKR. How can...
12
by: JBJ | last post by:
Hi, I'am very newbie in Python. For the moment I'am trying to convert an unicode character to his uppercase unaccented character. By example with locale fr_FR: a,A,à,À should return A o,O,ô,Ô...
40
by: Tameem | last post by:
hi my name is tameem. i am a new c programmer. in a c program i want to give input ""tameem"" and the output will be ""xdphhp"" in a short: the character ""a"" will be replaced by ""d"" i can...
1
by: Tjwapa | last post by:
How do i convert a column with id letters in a file to a number 1 or 0 in coldfusion output....for example 'CON' or 'BUS' to be converted to an output of '0'and '1' (0 to represent CON and 1 for...
3
by: phub11 | last post by:
Hi all, I was wondering if there is a quick way to convert numbers to letters, such as 1=A, and 26=Z. I can do it the laborious way using 26 definitions, but it's always nice to know of any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.