+ Reply to Thread
Results 1 to 2 of 2

Thread: Edit INI File: problems with UTF8 and ANSI files

  1. #1

    Default Edit INI File: problems with UTF8 and ANSI files

    Hello guys,
    I have a big problem in our installation script:
    we are passed few years ago from ANSI to UTF-8 in our software, so all our text files ( also INI) are automatically converted in UTF-8 first time they are opened by one of our software.
    Last month we found errors on some old ANSI ini files after and update to newer version, and after a big amount of debug we found that the problem is the Edit INI file command of setupbuilder.
    Is possible that, due the fact that the "new" file we save in the installer is written in UTF-8, the Edit INI file command save text written in UTF-8 also if the file opened is ANSI?
    Thats because, if we upgrade the version, we do not overwrite the INI file, so it's still an ANSI file.

    Hope you can help me

    Nicola

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Edit INI File: problems with UTF8 and ANSI files

    Nicola,

    The installer makes use of the standard Windows APIs to read and write INI files (e.g. GetPrivateProfileStringA). The native INI handling (ANSI) Windows APIs can only support ANSI coded files. They do not support UTF-8 encoded files and this is by Windows design! The INI functionality in Windows is only there to provide backward compatibility. The Windows INI file format does not support UTF-8.

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •