Re: [WebDNA] Foreign characters (2009)

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 102325
interpreted = N
texte = if the database content shows "caf=E9" and your user searches for =20 "cafe", i see a trick that could save your day: code the accented =20 caracters the old way, meaning the letter from one side, the accent on =20= the other: http://www.w3schools.com/tags/ref_entities.asp you would have á for =E1 è for =E8 é for =E9 etc... If you look for caf=E9, make your search form remove the accent in order = =20 to actually search for "cafe" (without accent). Then filter the db =20 content to remove the "&" and the accent itself (acute; agrave;...) =20 using [GetChars start=3D2&end=3D2][FindString = Source=3Dcafé&Find=3D\&][/=20 GetChars]. You could also use grep for this. Another idea: make your own accent coding in the database, moving the =20= accent at the end of the word: caf=E9 would be cafe(4acute) meaning "acute accent on the fourth = caracter" marf=EDl would be marfil(5acute) Then just remove the accent of the searched word, since it exists =20 without accent in your db. To show the searching results, you will =20 have to reconvert your coding method into a readable result. And what about the pinyin method? each accent has a number: =E9 is e2, =E1= =20 is a2 while =E8 would be e1 and =E0 would be a1. Well, there is a number of different ways to solve this. WebDNA is =20 flexible enough to experiment... ;-) but we cannot include this kind =20 of very specific features into WebDNA code: the product would become =20 extremely complicated while we want to keep it simple, with powerful =20 but unspecialized contexts. - chris On Apr 1, 2009, at 19:26, Cristi=E1n Tapia wrote: > Thanks for all the hints! > > The solution Chris mentioned works perfectly if you search for =20 > "caf=E9", because it removes the accented character and also looks for = =20 > the word "cafe". But, as all the words in my client's database are =20 > properly spelled and you won't find any record with "cafe" but =20 > "caf=E9" in it, if the user types it incorrectly (without the accented = =20 > character), which happens a lot, it won't return any records. > > If I try to make Chris's solution to work backwards, it will look =20 > for c=E1f=E9 or m=E1m=E1 or s=F3l=FAc=ED=F3n (it will put an accent in = every vowel) =20 > and there's no way I can tell the engine where the accented =20 > character should go, so I'm stuck again. > > I wish future versions of WebDNA could work the same way Google =20 > handles this kind of issue (search for the word regardless of =20 > accented characters). Is there any chance? > > Regards, > --------------------------------------------------- > Cristi=E1n Tapia Smith > Lemon Internet S.A. > ctapia@lemongroup.cl > http://www.lemongroup.cl > Antonia L=F3pez de Bello 172, Of. 801 > Fono: +562-7377682 > Santiago, Chile. > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Foreign characters (2009) (Frank Nordberg 2009)
  2. Re: [WebDNA] Foreign characters (2009) (Patrick McCormick 2009)
  3. RE: [WebDNA] Foreign characters (2009) ("Olin Lagon" 2009)
  4. Re: [WebDNA] Foreign characters (2009) (christophe.billiottet@webdna.us 2009)
  5. Re: [WebDNA] Foreign characters (2009) (Donovan Brooke 2009)
  6. Re: [WebDNA] Foreign characters (2009) (=?ISO-8859-1?Q?Cristi=E1n_Tapia?= 2009)
  7. Re: [WebDNA] Foreign characters (2009) (Frank Nordberg 2009)
  8. Re: [WebDNA] Foreign characters (2009) (Donovan Brooke 2009)
  9. Re: [WebDNA] Foreign characters (2009) (Patrick McCormick 2009)
  10. Re: [WebDNA] Foreign characters (2009) (Donovan Brooke 2009)
  11. Re: [WebDNA] Foreign characters (2009) (christophe.billiottet@webdna.us 2009)
  12. Re: [WebDNA] Foreign characters (2009) ("Dan Strong" 2009)
  13. Re: [WebDNA] Foreign characters (2009) (Donovan Brooke 2009)
  14. Re: [WebDNA] Foreign characters (2009) (Tom Duke 2009)
  15. Re: [WebDNA] Foreign characters (2009) ("Dan Strong" 2009)
  16. [WebDNA] Foreign characters (2009) (=?ISO-8859-1?Q?Cristi=E1n_Tapia?= 2009)
if the database content shows "caf=E9" and your user searches for =20 "cafe", i see a trick that could save your day: code the accented =20 caracters the old way, meaning the letter from one side, the accent on =20= the other: http://www.w3schools.com/tags/ref_entities.asp you would have á for =E1 è for =E8 é for =E9 etc... If you look for caf=E9, make your search form remove the accent in order = =20 to actually search for "cafe" (without accent). Then filter the db =20 content to remove the "&" and the accent itself (acute; agrave;...) =20 using [GetChars start=3D2&end=3D2][FindString = Source=3Dcafé&Find=3D\&][/=20 GetChars]. You could also use grep for this. Another idea: make your own accent coding in the database, moving the =20= accent at the end of the word: caf=E9 would be cafe(4acute) meaning "acute accent on the fourth = caracter" marf=EDl would be marfil(5acute) Then just remove the accent of the searched word, since it exists =20 without accent in your db. To show the searching results, you will =20 have to reconvert your coding method into a readable result. And what about the pinyin method? each accent has a number: =E9 is e2, =E1= =20 is a2 while =E8 would be e1 and =E0 would be a1. Well, there is a number of different ways to solve this. WebDNA is =20 flexible enough to experiment... ;-) but we cannot include this kind =20 of very specific features into WebDNA code: the product would become =20 extremely complicated while we want to keep it simple, with powerful =20 but unspecialized contexts. - chris On Apr 1, 2009, at 19:26, Cristi=E1n Tapia wrote: > Thanks for all the hints! > > The solution Chris mentioned works perfectly if you search for =20 > "caf=E9", because it removes the accented character and also looks for = =20 > the word "cafe". But, as all the words in my client's database are =20 > properly spelled and you won't find any record with "cafe" but =20 > "caf=E9" in it, if the user types it incorrectly (without the accented = =20 > character), which happens a lot, it won't return any records. > > If I try to make Chris's solution to work backwards, it will look =20 > for c=E1f=E9 or m=E1m=E1 or s=F3l=FAc=ED=F3n (it will put an accent in = every vowel) =20 > and there's no way I can tell the engine where the accented =20 > character should go, so I'm stuck again. > > I wish future versions of WebDNA could work the same way Google =20 > handles this kind of issue (search for the word regardless of =20 > accented characters). Is there any chance? > > Regards, > --------------------------------------------------- > Cristi=E1n Tapia Smith > Lemon Internet S.A. > ctapia@lemongroup.cl > http://www.lemongroup.cl > Antonia L=F3pez de Bello 172, Of. 801 > Fono: +562-7377682 > Santiago, Chile. > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ christophe.billiottet@webdna.us

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Virtual Domains (1998) Frames and WebCat (1997) Multiple prices (1997) Anyone get webdna to run on apache 2.x on osx? (2006) Download Question (1997) Close-to Comparison Code (1998) [WebDNA] Error 500 with SUMM=T (2017) Re2: frames & carts (1997) Upgrade to web DNA6.0 problem (2004) more info on [setlineitems] (1997) WebCat2b15MacPlugin - [protect] (1997) drop down menu (2000) TCPConnect to query for Domain expiration (2000) your mail (2000) Problem with Formulas.db (1998) Security (1998) Enhanced Master Counter? (1997) assigning a id no. (2000) Summing fields (1997) NT challenges default admin/admin password (2000)