Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Line endings in scrolls
New Topic New Poll Post Reply
Poster Message
disoriented
Level: Smitemaster
Avatar
Rank Points: 2379
Registered: 08-07-2007
IP: Logged

File: Test of Scroll.hold (897 bytes)
Downloaded 24 times.
License: Public Domain
icon Line endings in scrolls (+2)  
I'm using slimm tom's Mac beta (posted here) and I've noticed an issue with scrolls.

Attached is a test hold. When editing the scroll text, if I press the return key, a stray character is created. Maybe this is a carriage return character?

See the scroll on the left for an example of these characters.
Left scroll

The characters can be deleted, as I've done in the scroll on the right.
Right scroll

If you're running DROD on Windows, do the scrolls appear the same to you? Hold attached.

____________________________
34th Skywatcher

Best to PM me, since I might miss your message on CaravelNet chat.

[Last edited by disoriented at 08-03-2022 05:49 AM]
08-03-2022 at 04:35 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
disoriented
Level: Smitemaster
Avatar
Rank Points: 2379
Registered: 08-07-2007
IP: Logged
icon Re: Line endings in scrolls (0)  
https://stackoverflow.com/questions/3720612/what-is-the-universal-newline-for-all-operating-systems-lf-and-cr

____________________________
34th Skywatcher

Best to PM me, since I might miss your message on CaravelNet chat.
08-03-2022 at 05:50 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1055
Registered: 06-23-2006
IP: Logged
icon Re: Line endings in scrolls (0)  
This issue doesn't appear for me using the Windows build, so it might be Mac only.

EDIT: Previous version was unclear - Pressing the enter key doesn't generate junk characters, but I do see them in the attached hold.

Of course it occurs to me that since Linux also uses LF line endings, a Linux build might have that problem. But we don't have a Linux build of 5.1.1 so it's currently theoretical.

Either way an errant character is being inserted, but since DROD is meant to be a cross-platform application the problem is more likely to be with how scroll content is displayed.

____________________________
[Insert witty comment here]
Qzvlkx?

[Last edited by hyperme at 08-10-2022 03:56 PM]
08-08-2022 at 05:39 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1055
Registered: 06-23-2006
IP: Logged
icon Re: Line endings in scrolls (0)  
Did some extra poking because I'm worried about some other line-ending related stuff. According to the Visual Studio, the contents of disoriented's scrolls are:

Good scroll: "\rmilk\r\rcheese\r\reggs\r\rbutter\r\rflour"
Bad scroll: "\rຮThis is text\rຮ\rຮHere is some more text\rຮ\rຮHere is still more text"

Looking at some other scroll content confirms that DROD uses a carriage return (\r) for line breaks in scrolls. Presumably, something in the Mac build is causing another character to be inserted when editing. I have no idea why it's that specific character instead of a line break or other such character.

EDIT: A new question - Does this issue occur in other places text can be edited, such as the level description?

____________________________
[Insert witty comment here]
Qzvlkx?

[Last edited by hyperme at 08-23-2022 04:42 PM]
08-23-2022 at 04:37 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
disoriented
Level: Smitemaster
Avatar
Rank Points: 2379
Registered: 08-07-2007
IP: Logged

File: box.png (157.2 KB)
Downloaded 145 times.
License: Public Domain
icon Re: Line endings in scrolls (0)  
It does seem to occur in other text boxes. Maybe some kind of unicode vs ascii issue?



____________________________
34th Skywatcher

Best to PM me, since I might miss your message on CaravelNet chat.
08-23-2022 at 06:20 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
slimm tom
Level: Smitemaster
Avatar
Rank Points: 1226
Registered: 10-14-2006
IP: Logged
icon Re: Line endings in scrolls (+1)  
Tried to debug this a bit to no avail. Added code to Wchar.cpp SanitizeMultiLineString to output the input text to the console. This works for normal characters but the offending character that's added in the return isn't printed. Probably this is due to some encoding issue but my knowledge of strings/encodings in C++ is very limited.

When I copy the character directly from the DROD editor into a decoder I get \xEE\xAA\xA2, but I suspect this is not the offending input character but rather something that is displayed in the editor after it's gone through some operations.

[Last edited by slimm tom at 06-16-2023 08:43 PM]
06-16-2023 at 08:39 PM
View Profile Send Private Message to User Show all user's posts High Scores Quote Reply
disoriented
Level: Smitemaster
Avatar
Rank Points: 2379
Registered: 08-07-2007
IP: Logged
icon Re: Line endings in scrolls (+1)  
This issue is still present in the 5.1.1.550 final release of TSS (Mac).

____________________________
34th Skywatcher

Best to PM me, since I might miss your message on CaravelNet chat.
11-10-2023 at 05:33 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Line endings in scrolls
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.