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!
pjroyAsked:
Who is Participating?
 
itamarConnect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.