Author Topic: Encoding of text and config files  (Read 2437 times)

p3dx3

  • Hero Member
  • *****
  • Posts: 592
Encoding of text and config files
« on: June 06, 2017, 08:05:40 pm »
According to LM for P3D v4, cfg encoding should be UCS-2 LE BOM and xml files UTF-8

Can you update your simobjects and other files with this standard in a future update?
« Last Edit: June 06, 2017, 08:24:42 pm by 413x3 »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50741
    • VIRTUALI Sagl
Re: Encoding of text and config files
« Reply #1 on: June 07, 2017, 01:56:35 pm »
About .CFG files:

- We don't use the scenery.cfg anymore for our sceneries, but our software properly recognize if the scenery.cfg is encoded in UTF16LE (default), or if some other installer or the user has changed it in Ansi.

- We don't touch the add-ons.cfg file directly, but ask P3D to make all the needed changes for us.

- We don't touch the Prepar3D.cfg file, at all

About Simobject .CFG files:

- The simulator itself can read .cfg files encoded in both formats so, unless we had to use a non-Ansi characters in it, it would be useless to switch to UTF16, because it would result in doubling the file size with no benefit whatsoever

- If this was a problem (it's not), and an airplane.cfg or a sim.cfg didn't work, NO 3rd party airplane would work without converting the files, which is not obviously the case, precisely because the sim can recognize both encodings.

About .XML file:

XML files don't "have" to be encoded in any specific format. The only thing to be sure of, is the XML header (if present) must not conflict with the actual encoding of the file.

p3dx3

  • Hero Member
  • *****
  • Posts: 592
Re: Encoding of text and config files
« Reply #2 on: June 07, 2017, 05:29:34 pm »
I know they do not have to be, but I read LM saying this was a standard they are trying to use going forward so I thought it might be something you could look at for a future update.
« Last Edit: June 07, 2017, 07:11:42 pm by virtuali »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50741
    • VIRTUALI Sagl
Re: Encoding of text and config files
« Reply #3 on: June 07, 2017, 07:16:12 pm »
I know they do not have to be, but I read LM saying this was a standard they are trying to use going forward so I thought it might be something you could look at for a future update.

As I've said, unless we would need to include non-Ansi characters in one of these files, encoding them in Unicode won't give *any* benefit, other than doubling their size for no benefit, since the simulator obviously read both formats.

Be sure that, should LM would eventually drop support for Ansi files, which will obviously cause a much bigger issue that just our files, since it will break compatibility with each and every airplane out there( even freeware ones ), we would be notified well in advance before it would ever be a problem.