I need to display German special characters correctly in Delphi 2007 as for now I get characters like this “ü” appear like “?” in label components
any advise
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unexpected question mark (
?) shows up when text goes trough a code page conversion that fails.Since Delphi 2007 is not Unicode Enabled, your label’s
Captionis anAnsiString. The text you’re putting in there goes trough at least one code page conversion that fails, and you’ll have to figure out where the conversion takes place and why it’s failing.Common causes for code page conversions:
Labelcomes from the DFM (you wrote it in Object Inspector). Your machine and the test machine both use different "default code pages for non-Unicode applications". You should never see this while testing on your machine.Here’s a bit of code to put the
ücharacter in a Label for testing. The code selects theEASTEUROPE_CHARSETso I know I’m dealing with code page 1250. I’m doing so because the other Charset constants either select unusable code pages (that don’t include the "ü") or select a code page that depends on the OS (ie: no actual change).