On Jun 19, 2008, at 3:57 AM, Nathan Nobbe wrote:

On Wed, Jun 18, 2008 at 11:47 PM, Paul Novitski <[EMAIL PROTECTED] >
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 ;)

As someone that works with the US postal service on a daily basis, I can tell you that the post office prefers all addresses to be in UPPERCASE. They do this for readability by both the automation equipment and the actual workers. The only time you would want to have a mixed case address was if you were doing a mail merge and printed the address on the inside of the letter, it looks better there in mixed case. And if that is what you want/need I can recommend some software that costs about $1,300 a year that does just that...

<pitch>
Or I could periodically run your list through our software for a small fee :)

On the bright side though, Not only would I be able to fix the case to how you want it, Even with all those dutch names I see around me at least. But I could verify that the address exists and is valid. Even run it through the national change of address database to get the most up to date address :)
</pitch>


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to