NO

Author Topic: Issue in editor with Unicode (v12RC1) - *SOLVED*  (Read 1183 times)

Offline Fool-DupleX

  • Member
  • *
  • Posts: 17
Re: Issue in editor with Unicode (v12RC1) ?
« Reply #15 on: May 02, 2023, 10:18:01 AM »
Okay, it seems the issue is more subtle. Scenario :

1. Open freshly unzipped rsrc0009 project, then open the HTML\IDR_HTM_WELCOME in eng.rc by double-clicking on it
2. Modify html, save it, close that window. Note: the BOM is removed from the .htm file.
3. Reopen the resource IDR_HTM_WELCOME by double-clicking on it, it displays funny. You may do it several times, same behaviour every time.
4. Close the window.
5. Edit manually the .htm file with another editor, add the bom, save. Reopen IDR_HTM_WELCOME. *it stills displays funny*
6. Close and re-run Pelle's C, redo step 1, now it displays correctly. Update : it also works if simply closing the project or the eng.rc window and reopening it, no need to close the IDE.

So for sure, if there's a bom at the beginning of the file, saving the resource should leave that bom in place, for consistency. But it should not be added if there was no BOM in the first place. That's one thing. But also it looks like there is like a flag somewhere that's not updated properly when reopening a resource that has been modified in parallel with another editor (I think it's just not reloaded at all actually).

That's my best guess. Note that the bug is not high priority, there are workarounds. But it is disturbing when you do not expect it. Your body starts to shiver, for no mere mortal can resist the evil of Pelle's C ! HAHAHAHA... ;D

« Last Edit: May 02, 2023, 10:22:11 AM by Fool-DupleX »

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Issue in editor with Unicode (v12RC1) ?
« Reply #16 on: May 02, 2023, 11:04:41 AM »
Well, have you tried with RC2... ?!
/Pelle

Offline Fool-DupleX

  • Member
  • *
  • Posts: 17
Re: Issue in editor with Unicode (v12RC1) ?
« Reply #17 on: May 02, 2023, 01:04:12 PM »
Oh, I did not expect such a quick remedy !  :D

Yes, it works, the original bug I mentioned is fixed ! Thank you so much !

There's still one slight issue: when the resource points to an external file, like it is the case with IDR_HTM_WELCOME, if the external file is modified by another tool, the IDE only sees the old version. You must close the eng.rc file and reopen it for the IDR_HTM_WELCOME to be updated in the IDE (just closing and reopening IDR_HTM_WELCOME itself does not update its contents).

When this happens with a source code file, Pelles C shows a pop-up asking if you want to reload it.

But that's minor.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Issue in editor with Unicode (v12RC1) ?
« Reply #18 on: May 02, 2023, 06:01:24 PM »
Oh, I did not expect such a quick remedy !  :D
Just lucky timing...

There's still one slight issue: when the resource points to an external file, like it is the case with IDR_HTM_WELCOME, if the external file is modified by another tool, the IDE only sees the old version. You must close the eng.rc file and reopen it for the IDR_HTM_WELCOME to be updated in the IDE (just closing and reopening IDR_HTM_WELCOME itself does not update its contents).
This would require a longer chain of references, for a case that doesn't happen too often. Should work in a perfect world, but in this world it's not worth the trouble...
/Pelle