On Fri, 25 Nov 2005, Ehsan Akhgari wrote:

>
>   One solution would be to augment a DB capability
>   at the application level. That is instead of the search
>   or select qualified by a SQL where clause, simply get
>   everything (select *) and then let the application filter
>   what you want. Then when your given DB provides
>   that operation by itself, simplify your application
>   and deligate that to DB (Query Engine).
>
> Another solution is make the db believe your text is English.
> This could be done by "romanizing" the text before inserting it
> to the db, and converting it back to Unicode after reading it
> from the db and before displaying it to the user.  This can be
> done by choosing a Roman letter for each Persian letter, and
> reading Persian characters one by one and looking them up in a
> conversion table and writing the equivalent Roman characters to
> the output.  However, this has the downside that IIRC MySQL's
> full-text search is case-insensitive, and if I'm right in that
> you'd have to choose Roman characters all from one case (upper
> or lower.)  In addition to that, the data stored in the db
> might be difficult/impossible to use without such a conversion.
> It's you who should judge the tradeoffs before choosing to use
> this method or not.
>
> For some good romanizing scripts, check out 
> http://home.byu.net/jmd56/download.html.

Another options is to get yourself a real search engine, like
Apache Lucene.  I've written my experience using that here:

  http://mces.blogspot.com/2005/04/on-lucene-and-its-decency.html


> Ehsan

--behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
        -- Dan Bern, "New American Language"
_______________________________________________
PersianComputing mailing list
PersianComputing@lists.sharif.edu
http://lists.sharif.edu/mailman/listinfo/persiancomputing

Reply via email to