Random failure in importing gimp palette (gpl) files depending on their line endings
GIMP version:2.10.12
Note: bug reporters are expected to have verified the bug still exists either in the last stable version of GIMP or on updated development code (master branch).
Operating System: Microsoft Windows 10 Pro
Package: Installer from gimp.org
Description of the bug
Importation of gimp template files (gpl files) fails or works inconsistently. I thought the issue was line ending and I wrote a long description below but now whether or not the file ends with \r\n or \r or \n ... it works.
Below are my lamentations as I was preparing the issue previously.
I have been unable to find the description of a gimp plugin file, however I have been able to find this document that encourages us to study the gpl files installed and I have attachedben_eater_video_card.gpl one such file that I have made.
This file should be importable or readable if it is in the correct directory (global or user's palette directory) or if it is imported using right click on the palettes dialog tab.
This works correctly if the file is created in a linux environment where the end of line is represented only with the new line/line feed(\n) as in this ben_eater_video_card.gpl file.
If however the gpl file ends in the windows type of line ending (with both a new line and a carriage feed(\n\r)) or just carriage feeds after each number as in the previous attachmentben_eater_video_card.gpl, gimp does not import the file.
This can be hard to detect if you are making the file using a text editor that does not show you the line endings or (as in my case) when you programatically develop part of the file and copy paste it into notepad++ to complete it.
Reproduction
Is the bug reproducible? Randomly Reproduction steps: explained in description.
…
Expected result: Always imports the palette
Actual result: In some instances the palette is ignored and only one black color is imported.
Additional information
No bugtrace.