Results 1 to 3 of 3

Thread: Text input

  1. #1
    Join Date
    Dec 2007
    Posts
    21

    Question Unanswered: 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) ?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    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
    Home | Blog

  3. #3
    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 10:36.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •