Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id EB27D63271C for ; Fri, 1 Jan 2010 06:39:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27049-03 for ; Fri, 1 Jan 2010 10:39:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ananke.wxnz.net (ananke.wxnz.net [58.28.4.122]) by mail.postgresql.org (Postfix) with ESMTP id 4C3D66322BE for ; Fri, 1 Jan 2010 06:39:28 -0400 (AST) Received: from gonzo (ip-118-90-142-79.xdsl.xnet.co.nz [118.90.142.79]) by ananke.wxnz.net (Postfix) with ESMTP id 794644005F for ; Fri, 1 Jan 2010 23:39:25 +1300 (NZDT) Received: from news by gonzo with local (Exim 4.69) (envelope-from ) id 1NQeui-0004BS-1y for pgsql-sql@postgresql.org; Fri, 01 Jan 2010 23:39:24 +1300 To: pgsql-sql@postgresql.org Path: not-for-mail From: Jasen Betts Newsgroups: gmane.comp.db.postgresql.sql Subject: Re: Proper case function Date: 1 Jan 2010 10:39:23 GMT Organization: Dis (not Dat) Organisation Lines: 23 Message-ID: References: <302670f20912310940v2307bd0ey368815943615d37e@mail.gmail.com> NNTP-Posting-Host: localhost Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reversiblemaps.ath.cx 1262342363 16084 127.0.0.1 (1 Jan 2010 10:39:23 GMT) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-2 (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.189 tagged_above=-10 required=5 tests=BAYES_50=0.001, FH_DATE_PAST_20XX=3.188 X-Spam-Level: *** X-Archive-Number: 201001/1 X-Sequence-Number: 33537 On 2009-12-31, Michael Gould wrote: > Gary, > > Based on what I read it wouldn't handle cases where the result should be > > MacDonald from macdonald. There are other cases such as the sentence below > > ('it''s crazy! i couldn''t believe kate mcdonald, leo dicaprio, (terrence) > trent d''arby (circa the 80''s), and jada pinkett-smith all showed up to > [cHris o''donnell''s] party...donning l''oreal lIpstick! They''re heading to > o''neil''s pub later on t''nite. the_underscore_test. the-hyphen-test) > > This wouldn't handle the quotes and proper case all of the words. There is no case-restoring algorithm that works in all cases. Some people case their name differently just as some spell their name differently. Possibly for the same reasons. Contact the owners of the names and offer them the opportunity to have their name represented in the correct case - send them a link to an online form.