If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Text input

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-08, 09:03
noamsmadja noamsmadja is offline
Registered User
 
Join Date: Dec 2007
Posts: 21
Question Text input

i have a database with two languages, hebrew and english. i want to make a search form for it. but i dont want the user to choose in which language to look in.

i tried entering hebrew or english letters making it look in both languages... but it failed returning results randomly. (not exactly random... i guess it converted the word to ASCII or hex or something)

so i think i need to find out wt language was typed. to do so i thought of taking the first letter of the work. encoding it in unicode, converting it to hex or ASCII or any numeric form. and doing somthing like:

if 0 > letter <1000 than its english
if 10000 > letter <20000 than its hebrew

well obviously the numbers wont be 0 10000 20000 but the hex/ASCII range of each language.

another way i thought of is checking the windows keyboard language while typing... i found some code to do so but i had no idea how to implement it into ASP.vbs

can someone enlight me? may be there is some built in function for that? like WhatLanguage(abc) ?
Reply With Quote
  #2 (permalink)  
Old 01-14-08, 09:28
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Personally I'd make your user chose the different languages; I don't see why you want them to search both (feel free to enlighten me though!)...

In terms of getting the users settings, you can't do that in ASP...
Remember that ASP runs server side!

There may be a way of doing this in JavaScript, but I'm not personally aware of one
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 01-14-08, 09:31
noamsmadja noamsmadja is offline
Registered User
 
Join Date: Dec 2007
Posts: 21
the reason is that i dont want to get ppl confused.

we have english books and hebrew books. but every book (english or hebrew) has two titles. one in hebrew and one in english. (why? never mind )

search text: any text
book language: the books language
language search: search the title in hebrew or english

u can see it might be confusing.

so my questions would be:

1. how can i change a letter in the variable LETTER into a hex number?
2. how can i change an encryption of a single letter (only to this single letter). in case the user isnt typing unicode, i will have to change it to unicode.

Last edited by noamsmadja; 01-14-08 at 09:36.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On