Re: Capitalization of variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 18, 2008 at 11:47 PM, Paul Novitski <paul@xxxxxxxxxxxxxxxxxxx>
wrote:

> At 6/18/2008 09:38 PM, Nathan Nobbe wrote:
>
>> $streetAddr = "817 17th ST, DENVER COLORADO";
>> echo ucwords(strtolower($streetAddr));
>> // 817 17th St, Denver Colorado
>>
>
>
> I'd like to mention that, in practical usage, capitalizing the first letter
> of every word does not correctly capitalize addresses in most languages
> expressed in Roman script.  In North America we see numerous common
> exceptions such as PO, APO, NE/NW/SE..., MacDonald, Macdonald, deCamp,
> D'Angelo, de la Rosa, Apt. 3E, et cetera, et cetera.  If you're serious
> about correcting a mailing list for upper- & lowercase, I suggest you build
> or use a replacement dictionary that's smart about postal addresses and
> smart about the languages you're liable to encounter.  If you're in North
> America, a simple correcting algorithm is pretty much impossible because of
> the damage done by "Ellis Island" that has rendered the spelling of names
> arbitrary, even random, and often incorrect relative to their origins.  Good
> luck!  But don't give up -- as Xeno will attest, your earnest attempt to
> reach the tree with your arrow will gain praise even if it's doomed never to
> actually arrive.


right; this is very valid, and while i was tempted to delve into such tirade
myself i held back to answer the question as directly as possible.  but yes,
the post i made before is not something i would ever use to parse and store
/ use an address supplied by a user, nor would i recommend it be used in
such a way be anyone else ;)

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux