Jump to content
Sign in to follow this  
vgbaron

A Word of Caution when updating add ons in V4

Recommended Posts

I never thought  that Notepad++ was supposed to detect the correct character  set. I learned something  new but then again, it doesn't really work properly.

Share this post


Link to post
Share on other sites

Jay, you're right regarding Notepad++: It has no automatic detection. Just checked. I mixed that up with the Double Commander preview which *tries* to autodetect. :wacko: Meh.

Alex

Share this post


Link to post
Share on other sites

With so many characters sets possible, if a text editor could guess the actual set of a file, it would be better than my phone's  spell checker. Oh wait...😉

Share this post


Link to post
Share on other sites

Encoding is a problem already, even in the old incarnations of the ESP sims. I have a few testers in France and Germany, and they are using aircraft models that have "accents" and "Umlaut" in their config files and even in the models "title". And not only aircraft.cfg but in cameras.cfg as well. The simulator doesn't mind, but it is a lot of unnecessary effort to handle special characters in code when using .Net with a file that is supposed to be ASCII. I welcome the idea of UTF, although that probably means that I have to rewrite the respective addons and open a separate development stream only for V4 (which makes updating an app twice the effort than it should be). Would be even better if all config files would be changed to XML format to put an end to all these problems.

I only hope that all developers will keep the UTF encoding intact. It would be a disaster if everyone changed encoding of the config files to whatever they feel comfortable with. The simulator usually swallows everything without complaints - but another developer can end up having to check the encoding every time he reads a file, because he cannot be sure that it is per spec. But we will have to do that anyway I guess, as people will just drop their old content into the new sim too, so we end up with a veritable "zoo" of encodings.

IMHO, if there ever was a time to stick to those addons that have been updated for the new platform, then it is now.

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites
2 hours ago, Lorby_SI said:

separate development stream only for V4

Which I had to do. Pass the encoding down to the code reading the scenery.cfg for v4.:mellow:

2 hours ago, Lorby_SI said:

The simulator usually swallows everything without complaints

Yeah, exactly my experience with the scenery.cfg. Never ever read it with a strict validation especially since some add-ons place a mess in there. The sim is happy with this mess.

... and on the other hand some payware add-ons cannot even read PLN files with a valid XML comment while others need exactly Windows line breaks in the PLN (where is the banging head on keyboard emoticon?).

I'll stop whining now and "look forward" to the zoo.

Alex

 

Share this post


Link to post
Share on other sites

There is a preferred method of adding and removing addons from the sim using command lines that avoids messing up the individual files.  Developers should be using the preferred method.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
On ‎5‎/‎29‎/‎2017 at 7:28 AM, Lorby_SI said:

IMHO, if there ever was a time to stick to those addons that have been updated for the new platform, then it is now.

Best regards

If anyone remembers Michael Greenblatt from FSGS, you'll recall his mantra not to do anything with anything unless you're 100% sure it's OK.  It's worked well for me, not being a technical guy and all.  Although maybe appearing ultra cautious, I'm not even going to use any addons that say they're v4 compatible until they've been used for a week with no problems surfacing in the forums.


Forever indebted to the late Michael Greenblatt of FSGS.

 

 

 

Share this post


Link to post
Share on other sites

I'm glad there are pioneers willing to tease out these details for the less motivated like myself.  This discussion reinforces my plan to delay going down the V4 road until Majestic, Orbx, PMDG, HiFi, all have solid installers.   I've lost all desire to make something work that wasn't designed to work OOT box.


Noel

System:  7800x3D, Thermal Grizzly Kryonaut, Noctua NH-U12A, MSI Pro 650-P WiFi, G.SKILL Ripjaws S5 Series 32GB (2 x 16GB) 288-Pin PC RAM DDR5 6000, WD NVMe 2Tb x 1, Sabrent NVMe 2Tb x 1, RTX 4090 FE, Corsair RM1000W PSU, Win11 Home, LG Ultra Curved Gsync Ultimate 3440x1440, Phanteks Enthoo Pro Case, TCA Boeing Edition Yoke & TQ, Cessna Trim Wheel, RTSS Framerate Limiter w/ Edge Sync for near zero Frame Time Variance achieving ultra-fluid animation at lower frame rates.

Aircraft used in A Pilot's Life V2:  PMDG 738, Aerosoft CRJ700, FBW A320nx, WT 787X

 

Share this post


Link to post
Share on other sites

Ed, Alex, Oliver or anyone else that has posted in this thread so far. I've looked through the  V4 SDK Learning Center documentation and I can't find the references to cfg files being in any character set. The information must be there somewhere, but even Google couldn't find it. BTW, I've been experimenting with Notepad++ and saving cfg files as UTF-8 so far has not given P3d V4 anything to complain about.

Share this post


Link to post
Share on other sites

A - I didn't state any given character set, rather I stated that one should take care not to mess things up by changing it.

B - As I stated above, there is a proper method to add things to many files (scenery.cfg, adons.cfg, etc) that does not include the use of Notepad++ or any other text editor.  It needs to be used.

A great deal of support time entails correcting messed up files.  There's nothing to prove here... just wanting people to have fewer problems.  No more, no less.  I hope that's okay with you...


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites

I'm not disputing that. I'm just wondering  now what the actual character  set is. I understand  what you are saying, that the only supported method js to make changes to the cfg files is by command line options. 

Share this post


Link to post
Share on other sites

I found no mention of encoding in the old documentation. Didn't check v4.

But it is easy to find out if you have v4 (I don't have it yet):

  • Backup you scenery.cfg (Ctrl+C and Ctrl+V in Explorer)
  • Load the scenery.cfg in an editor that allows to change the encoding (Notepad++, jEdit, ...).
  • Switch encoding to UTF-8
  • Add some special characters (ä, ö, ü, ß, 北京市 or whatever) to a scenery title and save
  • Start the simulator and check if it shows the correct title or just garbage.

You can try the same with the local path and with and without BOM

Alex

Edit: Just read that Jay already tried it.

But is important to add special characters, German, Russian, Chinese whatever. Problems will not show up otherwise.

Edited by albar965

Share this post


Link to post
Share on other sites

The great little app called 'Scenery Config Editor' doesn't work in v4, and I'm guess due this very reason?

Share this post


Link to post
Share on other sites
On 5/24/2017 at 11:22 PM, vgbaron said:

As I understand it, the problem could come if the cfg file format is not maintained by the program making the edits. This could make it unreadable by P3D which could then result in either a reinstall or deleting all created content and letting P3D rebuild them. This would initially result in addons being disabled.

Until there is clarification from LM I would still suggest being aware and making an informed decision.

I have used EditPad Pro for all text file editing for previous versions of P3D FSX .CFG DLL'S etc.

 

Am I still ok with EditPad Pro or is this Notepad++ a safer way to go?

How to tell when a file like the P3Dv4 cfg file is in Unicode format prior to editing it and messing it up with a standard Notepad editor?


Best Regards,

Vaughan Martell - PP-ASEL KDTW

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...