469,353 Members | 2,066 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,353 developers. It's quick & easy.

ASCII lookup table

Not really VB related but I'll try here first :-) Looking for a lookup table
to match non-ASCII characters to their ASCII equivalent, if possible. For
example, the "o with an umlaut" on top would be matched to "o". It's part of
a search mechanism whereby if a user searches on bjorn it'll find the one
with the accents as well.

Cheers, Rob.
Nov 21 '05 #1
15 10548
Rob,

Probably impossible what you ask. ASCII uses only 7 bits and has very few
characters.
http://msdn.microsoft.com/library/de...cter_Codes.asp

Here Unicode charts
http://www.geocities.com/Athens/Acad.../fontset.htm#b

Here what used code parts
http://www.microsoft.com/globaldev/r...ocversion.mspx

I hope this helps anyhow

Cor
Nov 21 '05 #2
You're in luck: http://web.cs.mun.ca/~michael/c/ascii-table.html

Needed that a lot when I was writing a character conversion class.

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #3
Oh and this: it's a little more concise: http://www.lookuptables.com/

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #4
Just type in 'ASCII Character Codes' in the built in VB.NET MSDN
Documentation & you will find 2 pages; ~127 & 128~

Crouchie1998
BA (HONS) MCP MCSE
Official Microsoft Beta Tester
Nov 21 '05 #5
Chris,

Do you know that it is actualy wrong. There is no extended ASCII. Microsoft
shows the same table on there pages (see the link I gave). However for the
extended part are more code tables.

Something nobody did understand it seems. In my country did the 437 table
(US) exactly fit our needs, even the The Dutch florin character is there.

However Microsoft and IBM placed on a certain moment standard the 850 on
Dutch DOS. So you could forever fix that because in that is not the florin
character.

http://www.microsoft.com/globaldev/r...ocversion.mspx

Cor
Nov 21 '05 #6
"Rob Nicholson" <in******@community.nospam> schrieb:
Not really VB related but I'll try here first :-) Looking for a lookup
table
to match non-ASCII characters to their ASCII equivalent, if possible.


You will find character tables for various encodings here:

Global Development and Computing Portal -- Code Pages
<URL:http://www.microsoft.com/globaldev/reference/cphome.mspx>

An ASCII table can be found at <URL:http://www.asciitable.com/>.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #7
Crouchie,

Are you living in a country as Austria from where comes a lot of echo's

I wrote what you wrote in my first message.

:-))))

Cor
Nov 21 '05 #8
> Probably impossible what you ask. ASCII uses only 7 bits and has very few
characters.


I want to lookup Unicode as ASCII, not the other way around. For example,
map "e with grave accent" to "e".

Cheers, Rob.
Nov 21 '05 #9
> Here Unicode charts
http://www.geocities.com/Athens/Acad.../fontset.htm#b


This is perfect for starters and probably for our needs fine.

Cheers, Rob.
Nov 21 '05 #10
> to match non-ASCII characters to their ASCII equivalent, if possible. For
example, the "o with an umlaut" on top would be matched to "o". It's part

of

I didn't explain myself very well :-) But the Unicode tables supplied are
just what we were looking for. There is an age old problem with searching
databases that contain Unicode text with accented characters like Björn.
Carry out a standard search like this:

Select * From People Where Firstname='Björn'

And it'll work. However, carry out a search like this:

Select * From People Where Firstname='Bjorn'

And it won't return the same records AFAIK (unless something has changed).
So our solution is store two versions of every text field (OTT but database
isn't that big) so there's FirstName='Björn' but this is also run through a
mangle/lookup to store ASCII_FirstName='bjorn'. The search is also manged
and then the search carried out on the ASCII field.

If there is a SQL Server 2000 solution to this that works better, then I'd
love to hear!

Rob.
Nov 21 '05 #11
> Select * From People Where Firstname='Björn'

PS. And I'm kind of surprised that this came back through okay :-) Half
expected Usenet to 7 bit it all...

Rob.
Nov 21 '05 #12
Hi Rob,

I think we need to do the map ourselves.
Refer to the links Herfried posted, we can build such lookup table
ourselves.
And when make query, we may try to use a OR operation.
e.g.
select * from table1 where name='A' OR name='A with accent'

NOTE: the relation between A and A with accent need to get from the lookup
table our built before.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #13

Rob Nicholson wrote:
to match non-ASCII characters to their ASCII equivalent, if possible. For example, the "o with an umlaut" on top would be matched to "o".
It's part of

I didn't explain myself very well :-) But the Unicode tables supplied are just what we were looking for. There is an age old problem with searching databases that contain Unicode text with accented characters like Björn. Carry out a standard search like this:

Select * From People Where Firstname='Björn'

And it'll work. However, carry out a search like this:

Select * From People Where Firstname='Bjorn'

And it won't return the same records AFAIK (unless something has changed). So our solution is store two versions of every text field (OTT but database isn't that big) so there's FirstName='Björn' but this is also run through a mangle/lookup to store ASCII_FirstName='bjorn'. The search is also manged and then the search carried out on the ASCII field.

If there is a SQL Server 2000 solution to this that works better, then I'd love to hear!

Rob.


What you really want to do is to use an English accent insensitive
collation:

Select * From People Where Firstname COLLATE ENGLISH_CI_AI = 'Björn'

The above equals comparison will accept Bjorn, Björn, BJÖRN, BjôRn
etc.
HTH,
Jarl

Nov 21 '05 #14
>Select * From People Where Firstname COLLATE ENGLISH_CI_AI = 'Björn'
The above equals comparison will accept Bjorn, Björn, BJÖRN, BjôRn etc.


Now you see, this is *just* the kind of thing that t'internet is
indepensible for! I'm aware of the collate mechanism but primarily from
problems with migrating databases from SQL 7 to SQL 2000 where the temporary
table collate is different to the old SQL 7 database. Nightmare!

AFAIR, isn't COLLATE a SQL 2000 new feature?

Cheers, Rob
Nov 21 '05 #15
Hi

I am sorry I am not familar with SQL Server very much.
Based on my discussion with a SQL team engineer, the COLLATE is also
supported in SQL server 7.

If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #16

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by my-wings | last post: by
1 post views Thread by Zachary Turner | last post: by
1 post views Thread by !!bogus | last post: by
8 posts views Thread by Nik Martin | last post: by
28 posts views Thread by James Brown | last post: by
5 posts views Thread by Martin Landa | last post: by
3 posts views Thread by kettle | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.