[PHP] Re:[PHP] Capitalising Personal Names

2003-03-11 Thread Geoff Caplan
Hi folks, I have now hacked out a little name module on the lines discussed. The aim is to capitalise names which user has entered in all upper or all lower case. It would be useful in situations such as an e-commerce checkout where ease of use is more important than accuracy and you don't want t

Re[2]: [PHP] Capitalising Personal Names

2003-02-28 Thread Geoff Caplan
Dave, DOM> Maybe a script that tests the entry, and asks the user to reconfirm DOM> nonstandard spelling and capitalization. Something like... In many situations this would, I agree, be the ideal solution. But this is for an ecommerce checkout, and the customer feels it is important to make it a

Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Dave O'Meara
Maybe a script that tests the entry, and asks the user to reconfirm nonstandard spelling and capitalization. Something like... if ($name != ucwords($name) { //script that suggests ucwords($name) as a possible correction //but allows the user to confirm nonstandard capitalization scheme //by re-en

Re[2]: [PHP] Capitalising Personal Names

2003-02-28 Thread Geoff Caplan
John, JWH> The best solution I see is to start building yourself some JWH> arrays... Looks like a sensible approach, at least for the kind of rough and ready solution I need. My only comment would be to make use of the placement of the words. If the names are fielded ( first_name, middle_name, l

RE: [PHP] Capitalising Personal Names

2003-02-28 Thread John W. Holmes
> DS> Well it's hardly rocket science - > > I'm afraid it's a bit more complicated than that. There are hypenated > names, names with lower-case words like de and von, Irish style names > (O'Connell), Scots style names (MacDonald, McCalman) etc etc. And > there are exceptions in most of these case

Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Chris Hayes
> What is someone spells their name Desilva? > > On February 28, 2003 06:21 am, Justin French wrote: > > What about DeSilva And McSomething? I found another thread on this subject here: http://www.phpbuilder.com/mail/php-general/2002102/2138.php, but i did not read it. Looking at all the exampl

Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Joshua Moore-Oliva
well, as a last resort if you can find the perl module that does that conver the code to php... it's probably just a bunch of regular expressions, and php has a perl compat regular expressions interface.. Josh. On February 28, 2003 07:01 am, Geoff Caplan wrote: > Joshua, > > JMO> Make a perl s

Re[2]: [PHP] Capitalising Personal Names

2003-02-28 Thread Geoff Caplan
Joshua, JMO> Make a perl script that does what you want and use exec to pipe to it then :) This is certainly a sensible solution. But I'd have to learn enough about Perl to do it. And I think it would be slow for large volumes of names - exec seems to be slow in general, for some reason. It woul

Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Awlad Hussain
ebruary 28, 2003 11:35 AM Subject: Re: [PHP] Capitalising Personal Names > What is someone spells their name Desilva? > > On February 28, 2003 06:21 am, Justin French wrote: > > What about DeSilva And McSomething? > > > > Justin > > > > on 28/02/03 10:11 P

Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Joshua Moore-Oliva
Make a perl script that does what you want and use exec to pipe to it then :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Joshua Moore-Oliva
nce - a flick through the manual and I came > > up with : > > > > $name=ucwords(strtolower($name)); > > > > HTH > > > > Danny. > > > > - Original Message - > > From: "Geoff Caplan" <[EMAIL PROTECTED]> > > To: <

[PHP] Capitalising Personal Names

2003-02-28 Thread Geoff Caplan
Danny, DS> Well it's hardly rocket science - I'm afraid it's a bit more complicated than that. There are hypenated names, names with lower-case words like de and von, Irish style names (O'Connell), Scots style names (MacDonald, McCalman) etc etc. And there are exceptions in most of these cases to

RE: [PHP] Capitalising Personal Names

2003-02-28 Thread Jon Haworth
Hi Danny, > > I need to clean up the capitalisation of user-entered personal names. > > Well it's hardly rocket science - a flick through the manual and I > came up with : > $name=ucwords(strtolower($name)); While that would work in many cases, how do you catch exceptions such as the following?

Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Justin French
Danny. > > - Original Message - > From: "Geoff Caplan" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, February 28, 2003 10:31 AM > Subject: [PHP] Capitalising Personal Names > > >> Hi folks, >> >> I need to clean

Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Danny Shepherd
Hi, Well it's hardly rocket science - a flick through the manual and I came up with : $name=ucwords(strtolower($name)); HTH Danny. - Original Message - From: "Geoff Caplan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 28, 2003 10:31 AM

[PHP] Capitalising Personal Names

2003-02-28 Thread Geoff Caplan
Hi folks, I need to clean up the capitalisation of user-entered personal names. Once you start thinking about it, you realise it is a non-trivial issue, but previous discussions on the list presented only very partial solutions. In Perl, there are Cpan modules such as namecase and nameparse whic