NO

Author Topic: UTF-8 (no BOM) IDE Compile  (Read 2160 times)

Offline Robert

  • Member
  • *
  • Posts: 245
UTF-8 (no BOM) IDE Compile
« on: July 25, 2021, 11:35:49 PM »
Pelles C 11.0 RC1 can not compile attached UTF-8 (no BOM) project from IDE.
BOM compiles O.K.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: UTF-8 (no BOM) IDE Compile
« Reply #1 on: July 28, 2021, 12:41:18 PM »
If I add the option /utf-8 where it should be added, it works for me...

Project Options -> General -> Macros -> "CCFLAGS" (Edit macro button)
/Pelle

Offline Robert

  • Member
  • *
  • Posts: 245
Re: UTF-8 (no BOM) IDE Compile
« Reply #2 on: July 28, 2021, 08:18:26 PM »
If I add the option /utf-8 where it should be added, it works for me...

Project Options -> General -> Macros -> "CCFLAGS" (Edit macro button)

Well, as they say, "Did that, didn't work, uninstalled, reinstalled, now it does!"

MidSummer Madness. Thank you.

Offline John Z

  • Member
  • *
  • Posts: 796
Re: UTF-8 (no BOM) IDE Compile
« Reply #3 on: July 29, 2021, 03:27:36 PM »
Glad you got it working Robert.  At least in one version of your project file the /utf-8 was placed in
POC_PROJECT_ARGUMENTS = /utf-8#

instead of

CCFLAGS = -Tx86-coff -std:C99 -Ot -Ob1 -fp:precise -W1 -Gd -Ze -Zx#

but Pelle already helped on that ….  :)

John Z

Offline Robert

  • Member
  • *
  • Posts: 245
Re: UTF-8 (no BOM) IDE Compile
« Reply #4 on: July 29, 2021, 07:16:00 PM »
Glad you got it working Robert.  At least in one version of your project file the /utf-8 was placed in
POC_PROJECT_ARGUMENTS = /utf-8#

instead of

CCFLAGS = -Tx86-coff -std:C99 -Ot -Ob1 -fp:precise -W1 -Gd -Ze -Zx#

but Pelle already helped on that ….  :)

John Z

Hi John:

Thank you for your explicit explanation of the cause of the problem. I really appreciate that. Of course Pelle's solution was very helpful but I was still left wondering exactly what I did wrong. Next time I will look at the Project file before crying "Wolf" or "The Sky is Falling".

Offline Robert

  • Member
  • *
  • Posts: 245
Re: UTF-8 (no BOM) IDE Compile
« Reply #5 on: July 30, 2021, 08:21:59 AM »
Glad you got it working Robert.  At least in one version of your project file the /utf-8 was placed in
POC_PROJECT_ARGUMENTS = /utf-8#

instead of

CCFLAGS = -Tx86-coff -std:C99 -Ot -Ob1 -fp:precise -W1 -Gd -Ze -Zx#

but Pelle already helped on that ….  :)

John Z

Hi John:

Thank you for your explicit explanation of the cause of the problem. I really appreciate that. Of course Pelle's solution was very helpful but I was still left wondering exactly what I did wrong. Next time I will look at the Project file before crying "Wolf" or "The Sky is Falling".

Just to finally fully flesh out this tale of failure, misery, and guilt, I would like to add that my initial error was using upper case -UTF-8 as the option flag. It was in the right place but the wrong case.