CRLF and LF characters inside a message% add unwanted extra lines in Windows
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- desktop
Direzione di ricerca
Inizia con l’esempio minimo di racket/gui usando message% e riproduci i casi CRLF, LF e CR su Windows e Ubuntu. Confronta i caratteri di fine riga visualizzati tra le piattaforme; il lavoro è completato quando le forme di newline supportate non aggiungono più righe vuote indesiderate oppure il comportamento è chiaramente documentato come previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When creating a multi-line message% in a racket/gui app and running the app on an Ubuntu system, things display correctly no matter which line separator I use, i.e. it doesn't matter whether I use \n (the usual in Linux), \r\n (Windows) or even \r (which AFAIK is uncommon).
This is the app running in Racket v8.5 [cs] on Ubuntu 22.04 LTS:

However, when I run the same code in Windows, both the "CRLF" and the "LF only" versions add unwanted blank lines at the end, apparently one per line. Only the weird "CR only" version does what I want.
Same app, Racket v8.5 [cs], Windows 10:

The code I'm running:
#lang racket/gui
(define window-1 (new frame% [label "CRLF"] [width 256]))
(new message% [parent window-1] [label "Line 1\r\nLine 2\r\nLine 3"])
(send window-1 show #t)
(define window-2 (new frame% [label "CR only"] [width 256]))
(new message% [parent window-2] [label "Line 1\rLine 2\rLine 3"])
(send window-2 show #t)
(define window-3 (new frame% [label "LF only"] [width 256]))
(new message% [parent window-3] [label "Line 1\nLine 2\nLine 3"])
(send window-3 show #t)
I wouldn't have been surprised if Windows was only happy with the CRLF version, but just CR by itself seems like something's off. Is this expected behavior or an actual bug?
- Lingua principale
- Racket
- Stelle
- 68
- Fork
- 83
- Merge medio
- 9g 8h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di racket/gui
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
sumatrapdfreader/sumatrapdf#6403 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
whysosuresh/capsjump#86 ·
I maintainer di solito rispondono entro 1 giorno