473,804 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
15 10877
> 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ör n'

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

Select * From People Where Firstname='Bjor n'

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ör n' 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ör n'

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ör n'

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

Select * From People Where Firstname='Bjor n'

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ör n' 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2928
by: my-wings | last post by:
I've been reading about how evil Lookup fields in tables are, but I've got to be missing something really basic. I know this subject has been covered before, because I've just spent an hour or two reading about it on google, but there is something I still don't understand, and I'm hoping someone will be willing to explain it to me in small words. Let's say I have a table for addresses, and it includes a field for state. What I would...
1
3373
by: Zachary Turner | last post by:
I want to make a Lookup Field based on another Lookup field. In other words, I have this table A with two fields: ID and Name, where ID is an Autonumber and Name is a friendly name. Then I have a table B which links to A via a Lookup Field so that I can select the friendly name from combo box. Now, I want to have a table C which links to table B via a lookup field, and only displays the items which are selected in some combo box of some...
3
10675
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems that are hard to find. The main problem I am having right now is that I have a report that is sorted by one of these lookup fields and it only displays the record's ID number. When I add the source table to the query it makes several records...
1
1145
by: !!bogus | last post by:
Hi, I am developing an english/arabic webpage. I have some fields that should accept only english characters and other fields that should accept only arabic. I use a custom validator for this. How can I figure out whether each one of those fields contain the appropriate values. Giving me the ascii ranges (or at least how to figure out the arabic ones) would be sufficient.
8
14400
by: Nik Martin | last post by:
If I receive a message from the .net sockets class, it's a byte array. The original message is an ASCII string,like "70,70,70,70,70,0,0,0,0". The commas here represent individual bytes. The 70's are the ASCII code for "F", which I need to interpret as HEX F, or 15. Is this possible without a long, complicated lookup table? Thanks, Nik Martin
28
3416
by: James Brown | last post by:
All, I have a series of characters which I need to convert to integer values. Each character is read in turn from a function 'nextch', and hex-digits are identified by the isxdigit function - so I'm looking at '0' - '9', 'A' - 'Z' and 'a' - 'z'. Here is what I've got: int num = 0;
4
5383
by: Oleg Parashchenko | last post by:
Hello, I'm working on an unicode-aware application. I like to use "print" to debug programs, but in this case it was nightmare. The most popular result of "print" was: UnicodeDecodeError: 'ascii' codec can't decode byte 0xXX in position 0: ordinal not in range(128) I spent two hours fixing it, and I hope it's done. The solution is one
5
2631
by: Martin Landa | last post by:
Hi all, sorry for a newbie question. I have unicode string (or better say latin2 encoding) containing non-ascii characters, e.g. s = "Ukázka_možnosti_využití_programu_OpenJUMP_v_SOA" I would like to convert this string to plain ascii (using some lookup table for latin2)
3
3202
by: kettle | last post by:
Hi, I was wondering how I ought to be handling character range translations in python. What I want to do is translate fullwidth numbers and roman alphabet characters into their halfwidth ascii equivalents. In perl I can do this pretty easily with tr: tr/\x{ff00}-\x{ff5e}/\x{0020}-\x{007e}/;
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10351
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10096
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9174
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7638
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6866
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.