[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 140
  • Last Modified:

UpCase limitation in french

I need to upcase the first letter of a string. But when the the first caracter contain an accent (eg. e acute or a grave)the UpCase fonction let it in downcase. Any idea!
0
pjroy
Asked:
pjroy
  • 2
1 Solution
 
itamarCommented:
Hi,

You must use AnsiUpperCase.

IHTH

0
 
julio011597Commented:
Or write a few lines of code, in order to be sure your code works on any machine.

Let me know if you need it.
0
 
pjroyAuthor Commented:
I use code like the one above to upcase only the first, but I got an imcompatible type error.

descrition: string
description[1] := AnsiUpperCase(description[1]);

Can you help me on the use of string type
0
 
itamarCommented:
Hi pjrov,

Your question induced me to focus in the accent problem.
I guess you had the same type error with UpperCase, don't you ?

The best conduct in such case would be placing a comment before grading the answer - you gave me a B )-:<

Anyway, I think I can help you. Change your code to:

descrition: string
description[1] := AnsiUpperCase(description[1])[1];

No, this is not a mistyping !!! I know it looks strange but it works...

IHTH

P.S.: If you want a piece of code that upcases (?) the first letter of a text while it is being typed by the user in a edit or combo box, place another question and I can send it for you. Bye.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now