Solved

Propercase can't handle apostrophys

Posted on 2006-06-16
5
500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

679 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