mypoint Posted July 4, 2012 Report Share Posted July 4, 2012 Meklēju veidu ka input vai textarea laukā atrast non-latin burtus ar mīkstinājumiem (Ā,Č,Ē..) un pēctam tos automātiski nomainīt pret latin burtiem (A,C,E..). Quote Link to comment Share on other sites More sharing options...
0 vertex Posted July 4, 2012 Report Share Posted July 4, 2012 Apskaties šo http://lv.php.net/manual/en/function.preg-replace.php Quote Link to comment Share on other sites More sharing options...
0 daGrevis Posted July 4, 2012 Report Share Posted July 4, 2012 1. Uzliec eventu (trigerojas, kad kkas tiek rakstīts input'ā / textarea'ā), 2. Attiecīgo burtu čeko ar regulāro izteiksmi (_white-list approach_), 3. Ja burts ir non-Latin, samaini non-latin pret Latin alternatīvu (piemēram, izmantojot https://gist.github.com/1300994); Quote Link to comment Share on other sites More sharing options...
Question
mypoint
Meklēju veidu ka input vai textarea laukā atrast non-latin burtus ar mīkstinājumiem (Ā,Č,Ē..)
un pēctam tos automātiski nomainīt pret latin burtiem (A,C,E..).
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.