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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:27:03+00:00 2026-05-15T20:27:03+00:00

Is there an easier way to convert Delphi 7 to Delphi 2009? or is

  • 0

Is there an easier way to convert Delphi 7 to Delphi 2009?
or is there a way to use a Delphi 7 unit in a Delphi 2009 project?

I have a unit in Delphi 7 but the behavior is all messed up when I try to use it in my Delphi 2009 project.

It has a lot of differences like:

 Hangul = 'ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎ' +
           'ㅏㅐㅑㅒㅓㅔㅕㅖㅗㅛㅜㅠㅡㅣ';
 ShowMessage(Copy(Hangul, 1 + (I) * 2, 2));

Shows the characters one at a time in Delphi 7 but two at a time in Delphi 2009.
So I needed to change it to:

ShowMessage(Copy(Hangul, 1 + I, 1));

but that was the easiest, it get’s more confusing..and the algorithm isn’t mine so I can’t figure out the entirety of the program.

Any help would be appreciated.

EDIT:
and if anybody is interested to see the code here is the LINK. It’s the unit HanInput; part. It translates keys (in english) and outputs the Korean characters. And no, I don’t understand Korean.

  • 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-15T20:27:03+00:00Added an answer on May 15, 2026 at 8:27 pm

    I’d have a look at the encoding of your .pas file. You can do that using Notepad++ for example. If it is anything but UTF-8, change it to UTF-8 using notepad++. That should preserve the characters and make them readable for D2009. Oh and make sure the BOM (Byte Order Mark) for UTF-8 sis included.

    Not sure whether the file will then still be usable in D7 though… (Don’t know when UTF-8 support was added to the IDE).


    The Hangul strings in your example and the HanInput unit from your link have two bytes per character. This tells me that they are intended to be UTF-16 encoded.

    This is sort of confirmed by the MultiByteToWideChar calls, even though they are used on the arguments rather than the constants. If you are actually getting UTF-16 encoded into the functions, you could get rid of that call, but you still need to find a way to deal with the constants.

    Dealing with the constants – I don’t see all too many in that HanInput unit – could be as simple as copying the strings to a new Ansi encoded Notepad++ file, changing its encoding to UTF-8 and then copying the strings back to your unit. You may want to ensure that you first copy all strings to a new notepad++ file, then convert them and then copy them back, as the IDE editor will probably ask you whether you want to change the units format to UTF-8 and that may mangle the constants.

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

Sidebar

Related Questions

IS there an easier way to animate the table view. All the rows in
Is there an easier way to do this (retaining the ability to use VIEW_VISIBLE,
Is there an easier way to prevent a duplicate insert after refresh? The way
Is there an easier way of cleaning up a database that has a ton
Is there an easier way to get the path to an iOS application, than
In relation to my last question ( Is there an easier way of passing
I'm trying to compose a dynamic URL, is there any easier way to append
I'm pretty sure there is an easier way to do this that I'm missing
I basically need to check if there is an easier way to do this
I'm curious how others do it, or if there's an easier way... I'm having

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.