[RESOLVED 0.10.14] Tabs in quest texts displaying as garbage

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

[RESOLVED 0.10.14] Tabs in quest texts displaying as garbage

Post by pango »

Just seen in buckycarbon stream, tab characters display as (Unicode) garbage when formatted on screen:
quest text tabs.jpg
quest text tabs.jpg (36.67 KiB) Viewed 1468 times
So either we must be sure to not use tabs in quest files, or the engine should be modified to correctly display spaces...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Hazelnut
Posts: 3016
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Tabs in quest texts displaying as garbage

Post by Hazelnut »

It does display spaces correctly. For this sign off maybe the centre tag should be used. What quest is this?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Tabs in quest texts displaying as garbage

Post by pango »

Only tabs are displayed wrong. That's K0C30Y03, message 1025
In Emacs whitespace-mode:
message 1025.jpg
message 1025.jpg (31.18 KiB) Viewed 1460 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Tabs in quest texts displaying as garbage

Post by pango »

They seem rare, the only other occurrence I've found is in S0000009, Accept Quest message:
quest text tabs2.jpg
quest text tabs2.jpg (35.23 KiB) Viewed 1450 times
I haven't checked how this one actually displays...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Tabs in quest texts displaying as garbage

Post by BadLuckBurt »

Usually when these appear, it's a character set issue. Notepad++ says both files are ANSI as UTF-8 which should be fine, the other files say the same. Perhaps there is some attempt at conversion taking place when Unity loads these particular files, trigged by lord knows what.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
Hazelnut
Posts: 3016
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Tabs in quest texts displaying as garbage

Post by Hazelnut »

No idea how they were introduced but they need changing to spaces.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Tabs in quest texts displaying as garbage

Post by pango »

I submitted a PR

However this problem could easily come back...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Jay_H
Posts: 4072
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Tabs in quest texts displaying as garbage

Post by Jay_H »

Image

Come on folks, we know who "someone" is :lol: No idea when that would've changed but I uploaded a fix.

EDIT: I closed mine. pango's is better ;)

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Tabs in quest texts displaying as garbage

Post by BadLuckBurt »

pango wrote: Sat Nov 30, 2019 10:13 pm I submitted a PR

However this problem could easily come back...
The only other way to deal with this is replace them in the strings as they're loaded in but I don't think that's worth it.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

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

Re: Tabs in quest texts displaying as garbage

Post by pango »

Jay_H wrote: Sat Nov 30, 2019 10:14 pm Come on folks, we know who "someone" is :lol: No idea when that would've changed but I uploaded a fix.
Oops, Ninja'd by only 2 minutes!


What's strange is that it looks like the code is handling TABs specifically... but for some reason it doesn't work as expected :/
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Locked