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 605519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:09:17+00:00 2026-05-13T17:09:17+00:00

Using Delphi 2007 and TMS components for Unicode utils and interface (upgrading to Delphi

  • 0

Using Delphi 2007 and TMS components for Unicode utils and interface (upgrading to Delphi 2009 for Unicode support is not an option).

I’m storing a list of filenames in a string list (TTntStringList). It’s sorted and case insensitive. The default sort routine uses CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, …) to compare strings (and the same for Find). However, this is a problem because that will equate dummyss.txt with dummyß.txt (for example), but on NTFS it’s perfectly legal to have those two files in the same folder, i.e. they are treated as different names.

My understanding is that on Vista and newer, the correct way to compare filenames is to use CompareStringOrdinal. Is this correct?

On pre-Vista systems, what would be the correct way? I believe it should be CompareStringW(LOCALE_INVARIANT, …) but I’m not entirely sure.

Thanks

  • 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-05-13T17:09:17+00:00Added an answer on May 13, 2026 at 5:09 pm

    Quote from MSDN article Handling Sorting in Your Applications:

    CompareStringOrdinal compares two
    Unicode strings to test for binary
    equality, as opposed to linguistic
    equality. Examples of such
    non-linguistic strings are NTFS file
    names, …

    CompareStringOrdinal requires Windows Vista or later.

    Edit: Yes, it seems that in pre-Vista Windows you can use RtlCompareUnicodeString which is used internally by CompareStringOrdinal, too, and is available since Windows NT.

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

Sidebar

Ask A Question

Stats

  • Questions 508k
  • Answers 508k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Or if you don't want to worry about running versions… May 16, 2026 at 4:12 pm
  • Editorial Team
    Editorial Team added an answer Yes its a big mess. It would have been helpful… May 16, 2026 at 4:12 pm
  • Editorial Team
    Editorial Team added an answer update: when you do .addEvent('type', function(){ }) and .removeEvent('type', function(){… May 16, 2026 at 4:12 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Using Delphi 2007 I can write the following code: interface TTestType = (ttTest1, ttTest2);
I'm using Delphi 2007. Sometimes properties linking to components get lost. This is typically
I have a rather large (freeware) project written with Delphi 2007 which is using
I'm using Delphi 2007. How can I put a GIF/PNG image on a BitBtn
I'm using Delphi 2007, and I am looking for some newer looking glyphs to
I'm using Delphi 2007 and I am looking for some resources and best practices
I'm using Delphi 2007 Pro. I have a runtime package that includes a number
I am using Delphi 2007 with all patches and updates. I have a file
I am using Delphi 2007 and I am trying to make record type file.
Is there a easy way in Windows (using Delphi, not .NET) to convert UTC

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.