pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedAccent Marks
2+ messages / 2 participants
[nested] [flat]
* Accent Marks
@ 1999-12-05 15:39 Jonathan Karlen <jkarlen@karlen.com>
1999-12-05 18:03 ` Re: [SQL] Accent Marks tjk@tksoft.com <tjk@tksoft.com>
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Karlen @ 1999-12-05 15:39 UTC (permalink / raw)
To: pgsql-sql
Greetings,
I have a a client whom we're building a web application for that contains data in many languages. What they would like is for queries to be accent insensitive. In other words, for example in Spanish, if I was to search on the word "ir", I'd get back any results containing either "ir" or the same word with the "i" having an accent mark. I don't see how this is possible. Any advice?
Jonathan Karlen
**********************************************
Jonathan R. Karlen
Karlen Internet Solutions
jkarlen@karlen.com
www.karlen.com
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [SQL] Accent Marks
1999-12-05 15:39 Accent Marks Jonathan Karlen <jkarlen@karlen.com>
@ 1999-12-05 18:03 ` tjk@tksoft.com <tjk@tksoft.com>
0 siblings, 0 replies; 2+ messages in thread
From: tjk@tksoft.com @ 1999-12-05 18:03 UTC (permalink / raw)
To: jkarlen@karlen.com; +Cc: pgsql-sql
Jonathan,
You could write a custom function which handles the
searches for you, allowing i and i w/ an accent, for example, to
be handled as the same character. When implementing regular
expressions, one creates a pattern which can be used for
matching against strings. In your situation, you
could create a function which takes your string and
creates a pattern out of it, or to make things easier, just
accept the string as input and convert it to a string
which can be converted to a regular expression pattern
by Postgres.
E.g. you would accept your search string as input, and
find all i's in it, replacing them with "[iACCENTEDI]"
so that when a search is done, either of the i's qualifies.
There are more efficient ways of doing this, but this
would probably work for you.
Troy
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0045_01BF3F0D.080C1EC0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Greetings,
>
> I have a a client whom we're building a web application for that =
> contains data in many languages. What they would like is for queries to =
> be accent insensitive. In other words, for example in Spanish, if I was =
> to search on the word "ir", I'd get back any results containing either =
> "ir" or the same word with the "i" having an accent mark. I don't see =
> how this is possible. Any advice?
>
> Jonathan Karlen
> **********************************************
> Jonathan R. Karlen
> Karlen Internet Solutions
> jkarlen@karlen.com
> www.karlen.com
>
> ------=_NextPart_000_0045_01BF3F0D.080C1EC0
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META content=3D"text/html; charset=3Diso-8859-1" =
> http-equiv=3DContent-Type>
> <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT size=3D2>Greetings,</FONT></DIV>
> <DIV> </DIV>
> <DIV><FONT size=3D2>I have a a client whom we're building a web =
> application for=20
> that contains data in many languages. What they would like is for =
> queries=20
> to be accent insensitive. In other words, for example in Spanish, =
> if I was=20
> to search on the word "ir", I'd get back any results =
> containing either "ir"=20
> or the same word with the "i" having an accent mark. I don't see =
> how this=20
> is possible. Any advice?</FONT></DIV>
> <DIV> </DIV>
> <DIV><FONT size=3D2>Jonathan Karlen</FONT></DIV>
> <DIV><FONT =
> size=3D2>**********************************************<BR>Jonathan R.=20
> Karlen<BR>Karlen Internet Solutions<BR><A=20
> href=3D"mailto:jkarlen@karlen.com">jkarlen@karlen.com</A><BR><A=20
> href=3D"http://www.karlen.com">www.karlen.com</A></FONT></DIV></BODY></HT=
> ML>
>
> ------=_NextPart_000_0045_01BF3F0D.080C1EC0--
>
>
> ************
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-12-05 18:03 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-12-05 15:39 Accent Marks Jonathan Karlen <jkarlen@karlen.com>
1999-12-05 18:03 ` tjk@tksoft.com <tjk@tksoft.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox