Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8165959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:41:40+00:00 2026-06-06T19:41:40+00:00

I ve changed the codepage of my system to Russian as explained on this

  • 0

  1. I ve changed the codepage of my system to Russian as explained on this site
  2. PC is rebooted
  3. Then, I created a file in a dir with a name containing special russian character
  4. Then, I ve listed all files in this dir and tried to show the file with typical Delphi 7 code using:

 SearchRec: TSearchRec;

  FindFirst

  showmessage(SearchRec.Name);

  FindNext(SearchRec);
  FindClose(SearchRec);

The code works well.

When I redo all 4 steps with Vietnamese instead of Russian, the filename shown with showmessage is not correct. Some ? appear instead (see the screenshot):

enter image description here

Please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:41:41+00:00Added an answer on June 6, 2026 at 7:41 pm

    This is due to the way Delphi versions prior to 2009 implements their string type. It is not a problem of font, but a problem of character encoding.

    All string variables, and also all Windows API calls are performed using ANSI encoding. With ANSI, you can use only one code page at a time. In order to mix code pages (i.e. mix russian and vietnamese encodings), you’ll need to process the text and call UNICODE Windows API.

    Here is what occurred in your case:

    • You create a file with russian characters by Windows, using UNICODE encoding;
    • When you read the file using vietnamese current code page, only the first 127 characters (i.e. ASCII seven chars, e.g. numbers, main punctuations and English letters), are able to be read from UNICODE into ANSI vietnamese: during the conversion, all uncorrect characters are converted as ? in your ANSI vietnamese string.

    So you have several workarounds:

    • Upgrade to Delphi >= 2009, and your string will be UNICODE, so you will be able to mix character sets;
    • Use widestring for storing your text, and call directly the windows wide APIs – that is, you can’t use the VCL units nor FindFirst/FindNext as defined in SysUtils, nor ShowMessage as defined in Dialogs.

    Of course, the first one is the easiest!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Already changed file php.ini And the index.php file contains: <?php $server = 'name/SQLEXPRESS'; $link
I changed my .autotest file to use it with a Ruby-based project. After that,
I changed my wordpress permalinks to %pagname%. Prior to doing this i posted two
I changed the file permissions on all my files and directories in my Joomla
I changed a column name in a table, and i needed to change a
I changed the default routing in ASP.NET MVC from routes.MapRoute( Default, // Route name
(changed title so as not to confuse future readers) Is this an authoritative list
I changed permalink option for my wordpress pages to custom, like this /%postname%/. Now
I changed the folder that my WordPress installation was in. However, this worked fine,
Have a .wxl file for pt-BR and codepage 860, for some reason the included

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.