August 4, 20178 yr Hi- When clicking, "Check encoding errors" I get a dialog box saying the following files have incorrect character encoding. Which is the add-ons.cfg I also get the following unhandled exception error... -------------------------------------------------------------------------------------------------------------------------------------------------------------------- See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.UnauthorizedAccessException: Access to the path is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost) at P3DV4AddonOrganizer.MainDialog.bSave_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.6.1590.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll ---------------------------------------- P3DV4AddonOrganizer Assembly Version: 0.95.6416.27990 Win32 Version: 0.95.0.0 CodeBase: file:///C:/Users/Mark/Documents/Prepar3D%20v4%20Add-ons/Lorby-SI%20AddonOrganizer_P3D_V4/P3DV4AddonOrganizer.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.6.1590.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.6.1590.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.6.1590.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.6.1590.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.6.1590.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.6.1590.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.6.1590.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- Microsoft.VisualBasic Assembly Version: 10.0.0.0 Win32 Version: 14.6.1590.0 built by: NETFXREL2 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box. Any ideas? Thanks, Mark
August 4, 20178 yr Commercial Member If one of the add-on.cfgs (there are two) has an incorrect encoding, then something screwed it up. You can use Notepad++ to re-encode it to UTF16 (UCS-2 LE) Access denied: Are you running the P4AO "as Administrator"? All config files of the simulator are in protected, hidden folders, where a mere user doesn't have access to. Best regards LORBY-SI
August 5, 20178 yr Author Thanks Oliver, that did it. I bought and installed SimStarter. Didn't like it and removed it. Maybe that had something to do with it. Cheers, Mark
December 5, 20178 yr On 8/4/2017 at 11:52 PM, Lorby_SI said: If one of the add-on.cfgs (there are two) has an incorrect encoding, then something screwed it up. You can use Notepad++ to re-encode it to UTF16 (UCS-2 LE) Access denied: Are you running the P4AO "as Administrator"? All config files of the simulator are in protected, hidden folders, where a mere user doesn't have access to. Best regards Oliver, in Notepad++ to re-encode I have "UCS-2 LE BOM" encoding. Is this the right option to fix encoding errors in add-on.cfg and add-on.xml? Thanks PS: Also, what is the difference Encode in UCS-2 LE BOM and Convert to UCS-2 LE BOM? Which one to use? Edited December 5, 20178 yr by Dirk98
December 5, 20178 yr Commercial Member 3 hours ago, Dirk98 said: Is this the right option to fix encoding errors in add-on.cfg and add-on.xml? No. UCS-2 LE BOM is only valid for the .cfg files. XML files of any kind must have the encoding that is designated in their text declaration (the first line of the file, the one with <?xml). This is mostly UTF-8, and if the P4AO wrote it, it will be UTF-8 with BOM. But there are others too, even XMLs with no text declaration - with those it is hit-or-miss if they are encoded UTF-8 or even ASCII. No idea what the difference between Encode and Convert is in Notepad++. You will have to ask the developer of that tool about that. Best regards LORBY-SI
December 6, 20178 yr On 05.12.2017 at 4:57 PM, Lorby_SI said: No. UCS-2 LE BOM is only valid for the .cfg files. XML files of any kind must have the encoding that is designated in their text declaration (the first line of the file, the one with <?xml). This is mostly UTF-8, and if the P4AO wrote it, it will be UTF-8 with BOM. But there are others too, even XMLs with no text declaration - with those it is hit-or-miss if they are encoded UTF-8 or even ASCII. Best regards Then I guess you should fix something in your Add-on Organizer. I checked it on 2 reinstalls: after I installed FSL A320X and Spotlights I ran the Organzier, opened and checked Packages. AO showed encoding errors in both pristine add-on.xml (Spotlight's and FSL A320X's) and prestine add-ons.cfg file (the empty one) in Users\..\Roaming\Lockheed Martin\Prepar3d v4. So I opened each of the reported files in Notepad++ and Encoded it in UCS-2 LE BOM (don't ask me why lol) then saved them. After that I opened AO and checked Packages again - this time no encoding errors were reported by AO. I did this 2 times, rolling back with Acronis and installing FSL Spotlights and A320x afresh. So go figure... Thanks,
December 6, 20178 yr Commercial Member On 06.12.2017 at 6:42 PM, Dirk98 said: Then I guess you should fix something in your Add-on Organizer. I checked it on 2 reinstalls: after I installed FSL A320X and Spotlights I ran the Organzier, opened and checked Packages. AO showed encoding errors in both pristine add-on.xml (Spotlight's and FSL A320X's) and prestine add-ons.cfg file (the empty one) in Users\..\Roaming\Lockheed Martin\Prepar3d v4. So I opened each of the reported files in Notepad++ and Encoded it in UCS-2 LE BOM (don't ask me why lol) then saved them. After that I opened AO and checked Packages again - this time no encoding errors were reported by AO. I did this 2 times, rolling back with Acronis and installing FSL Spotlights and A320x afresh. So go figure... Thanks, Hi, the message about the encoding is just a bit of information, it is not indicating an error. The sim will read pretty much anything. I thought it would be helpful if the user had the option to check if the config files show the encoding that is expected. If there are entries in this log, then this tells you that for some of your files the encoding couldn't be determined (for example if the byte order mark is missing) - nothing more and nothing less. That does not mean that the files are wrong or that the sim couldn't handle them. But if there is something going wrong with your sim, this is an additional bit of info that might be helpful. There are so many things that can go wrong with text file encoding, and basically no way to determine them in advance. You only notice later, if files suddenly can't be read any more or if your "Umlaut"s are looking funny, or if the whole file suddenly seems to contain total garbage...etc Generally speaking this is something that developers should concern them with (W3C, RFCs, all specs are there for a reason), and keep these issues away from the end user. Best regards LORBY-SI
December 7, 20178 yr Commercial Member On 06.12.2017 at 6:42 PM, Dirk98 said: So I opened each of the reported files in Notepad++ and Encoded it in UCS-2 LE BOM No! It is not that simple. XML files are UTF-8 with BOM if the text declaration says UTF-8. If there is no text declaration, then they are either UTF-8 without BOM or plain ASCII. Only ".cfg" files have Unicode encoding (UCS-2 LE) Best regards LORBY-SI
December 7, 20178 yr Commercial Member On 06.12.2017 at 6:42 PM, Dirk98 said: So go figure... P4AO will detect the enconding of the files that it reads, and it will write them in that encoding too. It will not check if you have screwed up the text declaration vs the encoding in your XML files, that is your responsibility. As long as Microsofts XML serializer is happy, P4AO won't object. Best regards LORBY-SI
December 8, 20178 yr 16 hours ago, Lorby_SI said: P4AO will detect the enconding of the files that it reads, and it will write them in that encoding too. It will not check if you have screwed up I've had it already with MyTraffic6 add-on.xml, so I don't fix xml files when encoding errors are reported anymore. Only cfg files from now on )) Thanks!
December 17, 20178 yr It is simple to fix the add-on.xml encoding errors with P4AO. Just open up P4AO, click on the scenery addon identified by P4AO as having encoding errors, click on edit and then save it. It will be properly encoded. The scenery.cfg is more difficult but I save it as scenery.cfg.off, restart P3D and a new scenery.cfg is rebuilt (and properly encoded). Open it up in notepad+++ and also open up scenery.cfg.off in notepad+++. Copy all of your addon entries from the .off to the new scenery.cfg and save. Best regards, Jim Jim Young | AVSIM Online! - Simming's Premier Resource! Member, AVSIM Board of Directors - Serving AVSIM since 2001 Submit News to AVSIMImportant other links: Basic FSX Configuration Guide | AVSIM CTD Guide | AVSIM Prepar3D Guide | Help with AVSIM Site | Signature Rules | Screen Shot Rule | AVSIM Terms of Service (ToS) I7 8086K 5.0GHz | GTX 1080 TI OC Edition | Dell 34" and 24" Monitors | ASUS Maximus X Hero MB Z370 | Samsung M.2 NVMe 500GB and 1TB | Samsung SSD 500GB x2 | Toshiba HDD 1TB | WDC HDD 1TB | Corsair H115i Pro | 16GB DDR4 3600C17 | Windows 10
March 16, 20197 yr Something's strange here lately, never happened before, but it's now reporting both ADD-ONS.CFG from AppData AND ProgramData with incorrect character encoding. The thing is these files have not enconding information in the header. There's actually no header. Moreover I have saved them both as UTF8 but it didn't solve either. The software version is the latest (b10). Best regards, Wanthuyr Filho Instagram: AeroTacto
March 16, 20197 yr Commercial Member 54 minutes ago, Wanthuyr Filho said: Something's strange here lately, never happened before, but it's now reporting both ADD-ONS.CFG from AppData AND ProgramData with incorrect character encoding. The thing is these files have not enconding information in the header. There's actually no header. Moreover I have saved them both as UTF8 but it didn't solve either. The software version is the latest (b10). You should never mess with these files. This message doesn't appear just like that, something (installer or incompatible editor) changed their encoding. In this case the "incorrect character encoding" message probably means that the encoding couldn't be determined. Which is the case if you save them as UTF-8 without the ByteOrderMark (BOM). Which is still incorrect. CFG files have to be encoded in UTF-16 (UCS-2 LE BOM in Notepad++) There was a sticky thread to that effect in the Prepar3D subforum once, but it has disappeared now. Best regards LORBY-SI
March 16, 20197 yr Commercial Member 1 hour ago, Wanthuyr Filho said: The thing is these files have not enconding information in the header. Only XML files have that. Best regards LORBY-SI
Archived
This topic is now archived and is closed to further replies.