Line return conventions not consistent between text file resources

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Line return conventions not consistent between text file resources

Post by pango »

Just forwarding an issue seen on Twitter:
Line returns convention of text file resources in released builds is not consistent:

Code: Select all

./StreamingAssets/Textures/readme.txt:                          ASCII text
./StreamingAssets/Text/SpellmakerUI.txt:                        ASCII text
./StreamingAssets/Text/ModSystem.txt:                           HTML document, ASCII text
./StreamingAssets/Text/MainMenu.txt:                            ASCII text
./StreamingAssets/Text/GameSettings.txt:                        ASCII text
./StreamingAssets/Text/DaggerfallUI.txt:                        ASCII text
./StreamingAssets/Text/ConversationText.txt:                    ASCII text, with CRLF, LF line terminators
./StreamingAssets/Text/ClassicEffects.txt:                      ASCII text
./StreamingAssets/Tables/Spells-Entity.txt:                     ASCII text
./StreamingAssets/Tables/QuestList-DFU.txt:                     ASCII text
./StreamingAssets/Tables/QuestList-Classic.txt:                 ASCII text
./StreamingAssets/SoundFonts/readme.txt:                        ASCII text
./StreamingAssets/QuestPacks/readme.txt:                        ASCII text, with no line terminators
./StreamingAssets/Mods/readme.txt:                              ASCII text, with no line terminators
./boot.config:                                                  ASCII text
Maybe they could be converted during build to match the target platform, or all converted to CRLF (it seems MacOS and Linux users are more used/have more tools to handle that format than symetrically Windows users with LF riles).
Cheap (but brittle) solution would be to convert text resources to CRLF in Git.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Line return conventions not consistent between text file resources

Post by Interkarma »

User is likely also using a downlevel or unpatched version of Windows, as Notepad in current versions of Windows can open all these documents OK. It's a fairly recent change though.

Best answer is to use a superior text editor like Notepad++, which I'm happy to see you directed him towards. I'm not really convinced this is a bug in DFU so much as a limitation of an old version of a bad text editor.

Can you give me more detail on ModSystem.txt and HTML? This looks like a standard UTF-8 text file with LF terminators when looking at output from most recent build.

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Line return conventions not consistent between text file resources

Post by pango »

Interkarma wrote: Sun Nov 18, 2018 9:29 pm Can you give me more detail on ModSystem.txt and HTML? This looks like a standard UTF-8 text file with LF terminators when looking at output from most recent build.
That's the output of "file" command, it's been known to be wrong sometimes ;)
I think this time it detected HTML format because the file contains "<title"
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Line return conventions not consistent between text file resources

Post by Interkarma »

Ah, that would explain it. Cheers. :)

Post Reply