Home All Groups Group Topic Archive Search About
Author
12 Apr 2005 2:46 PM
Rob Nicholson
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.

Author
12 Apr 2005 3:36 PM
Cor Ligthert
Rob,

Probably impossible what you ask. ASCII uses only 7 bits and has very few
characters.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/_pluslang_ASCII_Character_Codes.asp

Here Unicode charts
http://www.geocities.com/Athens/Academy/4038/graph/fontset.htm#b

Here what used code parts
http://www.microsoft.com/globaldev/reference/oslocversion.mspx

I hope this helps anyhow

Cor
Author
12 Apr 2005 11:25 PM
Rob Nicholson
> 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.
Author
12 Apr 2005 11:26 PM
Rob Nicholson
This is perfect for starters and probably for our needs fine.

Cheers, Rob.
Author
12 Apr 2005 5:19 PM
Chris Murphy via DotNetMonster.com
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
Author
12 Apr 2005 5:24 PM
Chris Murphy via DotNetMonster.com
Oh and this: it's a little more concise: http://www.lookuptables.com/

--
Message posted via http://www.dotnetmonster.com
Author
12 Apr 2005 5:48 PM
Cor Ligthert
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/reference/oslocversion.mspx

Cor
Author
12 Apr 2005 5:39 PM
Crouchie1998
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
Author
12 Apr 2005 6:09 PM
Cor Ligthert
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
Author
12 Apr 2005 5:54 PM
Herfried K. Wagner [MVP]
"Rob Nicholson" <informed@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/>
Author
13 Apr 2005 5:35 AM
Peter Huang" [MSFT]
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.
Author
12 Apr 2005 11:34 PM
Rob Nicholson
> 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.
Author
12 Apr 2005 11:36 PM
Rob Nicholson
> 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.
Author
13 Apr 2005 7:22 AM
jarl
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.
Show quoteHide quote
> 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
Author
13 Apr 2005 12:16 PM
Rob Nicholson
>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
Author
14 Apr 2005 5:21 AM
Peter Huang" [MSFT]
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.