* bug#21221: guile-2.2 socket ports used with display does not send utf8 !
@ 2015-08-09 2:20 Linas Vepstas
2015-10-29 23:11 ` Ludovic Courtès
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Linas Vepstas @ 2015-08-09 2:20 UTC (permalink / raw)
To: 21221
The following simple client-server program fails for me.
For simplicity, for the server, just use netcat listening on port 7777:
$ nc -l 7777
In a guile shell, try this:
(setlocale LC_ALL "")
(define sss (socket PF_INET SOCK_STREAM 0))
(set-port-encoding! sss "utf-8")
(connect sss AF_INET (inet-pton AF_INET "127.0.0.1") 7777)
(set-port-encoding! sss "utf-8")
(display "SmålandSmåland\n" sss)
(close-port sss)
The SmålandSmåland gets corrupted: nc receives Sm?landSm?land
Some types of utf8 do go through, so e.g. (display "Ćićolina\n" sss)
seems to work fine. This finish/norweign thing, though, fails,
vietnamese too.
(display "Hòa Phú Phú Tân Hiệp An Tương Bình Hiệp Định Hòa\n" sss)
I suppose the answer is "don't use display for sending strings on a
socket", but I'm stumped as to why there should even be an encoding
error, why its not utf8 end-to-end.
This is for guile-2.2 from a recent git pull of the master source from
about June 2015, but I believe the problem occurs on guile-2.0 as
well.
guile --version
guile (GNU Guile) 2.1.0.305-e7097-dirty
this is on ubuntu 14.04 aka ubuntu trusty
-- Linas Vepstas
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21221: guile-2.2 socket ports used with display does not send utf8 !
2015-08-09 2:20 bug#21221: guile-2.2 socket ports used with display does not send utf8 ! Linas Vepstas
@ 2015-10-29 23:11 ` Ludovic Courtès
2016-06-20 15:55 ` Andy Wingo
[not found] ` <handler.21221.D21221.146643814711185.notifdone@debbugs.gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2015-10-29 23:11 UTC (permalink / raw)
To: Linas Vepstas; +Cc: 21221
Linas Vepstas <linasvepstas@gmail.com> skribis:
> The following simple client-server program fails for me.
> For simplicity, for the server, just use netcat listening on port 7777:
>
> $ nc -l 7777
>
> In a guile shell, try this:
> (setlocale LC_ALL "")
> (define sss (socket PF_INET SOCK_STREAM 0))
> (set-port-encoding! sss "utf-8")
> (connect sss AF_INET (inet-pton AF_INET "127.0.0.1") 7777)
> (set-port-encoding! sss "utf-8")
> (display "SmålandSmåland\n" sss)
> (close-port sss)
I can confirm this bug with commit 00884bb.
Guile 2.0.11ish is unaffected though.
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21221: guile-2.2 socket ports used with display does not send utf8 !
2015-08-09 2:20 bug#21221: guile-2.2 socket ports used with display does not send utf8 ! Linas Vepstas
2015-10-29 23:11 ` Ludovic Courtès
@ 2016-06-20 15:55 ` Andy Wingo
[not found] ` <handler.21221.D21221.146643814711185.notifdone@debbugs.gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2016-06-20 15:55 UTC (permalink / raw)
To: Linas Vepstas; +Cc: 21221-done
On Sun 09 Aug 2015 04:20, Linas Vepstas <linasvepstas@gmail.com> writes:
> The following simple client-server program fails for me.
> For simplicity, for the server, just use netcat listening on port 7777:
>
> $ nc -l 7777
>
> In a guile shell, try this:
> (setlocale LC_ALL "")
> (define sss (socket PF_INET SOCK_STREAM 0))
> (set-port-encoding! sss "utf-8")
> (connect sss AF_INET (inet-pton AF_INET "127.0.0.1") 7777)
> (set-port-encoding! sss "utf-8")
> (display "SmålandSmåland\n" sss)
> (close-port sss)
>
>
> The SmålandSmåland gets corrupted: nc receives Sm?landSm?land
I have tried this in 2.1.3 and it seems to work for me. Thanks for the
report, please reopen if you can still reproduce the bug.
Cheers,
Andy
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21221: closed (Re: bug#21221: guile-2.2 socket ports used with display does not send utf8 !)
[not found] ` <handler.21221.D21221.146643814711185.notifdone@debbugs.gnu.org>
@ 2016-06-21 13:31 ` Linas Vepstas
0 siblings, 0 replies; 4+ messages in thread
From: Linas Vepstas @ 2016-06-21 13:31 UTC (permalink / raw)
To: 21221
[-- Attachment #1: Type: text/plain, Size: 238 bytes --]
On Mon, Jun 20, 2016 at 10:56 AM, GNU bug Tracking System <
help-debbugs@gnu.org> wrote:
> (display "Hòa Phú Phú Tân Hiệp An Tương Bình Hiệp Định Hòa\n" sss)
Yep, it now works for me with guile-2.1.3
--linas
[-- Attachment #2: Type: text/html, Size: 595 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-21 13:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-09 2:20 bug#21221: guile-2.2 socket ports used with display does not send utf8 ! Linas Vepstas
2015-10-29 23:11 ` Ludovic Courtès
2016-06-20 15:55 ` Andy Wingo
[not found] ` <handler.21221.D21221.146643814711185.notifdone@debbugs.gnu.org>
2016-06-21 13:31 ` bug#21221: closed (Re: bug#21221: guile-2.2 socket ports used with display does not send utf8 !) Linas Vepstas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).