Solved

Propercase can't handle apostrophys

Posted on 2006-06-16
5
485 Views
Last Modified: 2012-06-27
When using Propercase on a company's name I get false output if there is an apostrophy in the string.  Example:  From Propercase({CompanyName})  on "JEFF'S FIRM" I get:  "Jeff'S Firm" instead of the assumed correct output: "Jeff's Firm"   Can anybody help with a workaround on this solution?  I tried Replace(Propercase([CompanyName]), "'S","'s"), however, it didn't work.  Any ideas?
0
Comment
Question by:randybdavis
  • 3
  • 2
5 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 16922888
I'm surprised that what you tried didn't work because it does work for me - maybe a difference in versions.

   replace(propercase("Joe's Diner"),"'S","'s")

The above returns "Joe's Diner" exactly as you'd want.  You might want to try forcing the lower case conversion like this:

   replace(propercase({CompanyName}),"'S",lcase("'s"))



frodoman
0
 

Author Comment

by:randybdavis
ID: 16923036
Hi frodoman,

I used your code and this is the output:

Company Name (Lessee or Owner): Jeff`S Firm
0
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 16923118
Are you certain that the apostrophe is really an apostrophe?  For example, could it be the accent mark that's normally under the tilde (~) on the keyboard?  Although in many fonts they look identical the ascii code for them is different so your replace won't find it unless you use the same accent character in your formula.

frodoman
0
 

Author Comment

by:randybdavis
ID: 16923172
Hey frodoman,

Congradulations,  you won!!!  It was that character under the tilde.

Thank you.  :-)
0
 
LVL 42

Expert Comment

by:frodoman
ID: 16923247
You're welcome - glad I could help.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now