GNU bug report logs -
#21221
guile-2.2 socket ports used with display does not send utf8 !
Previous Next
Reported by: linasvepstas <at> gmail.com
Date: Sun, 9 Aug 2015 02:22:02 UTC
Severity: normal
Done: Andy Wingo <wingo <at> pobox.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21221 in the body.
You can then email your comments to 21221 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#21221
; Package
guile
.
(Sun, 09 Aug 2015 02:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
linasvepstas <at> gmail.com
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Sun, 09 Aug 2015 02:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-guile <at> gnu.org
:
bug#21221
; Package
guile
.
(Thu, 29 Oct 2015 23:12:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 21221 <at> debbugs.gnu.org (full text, mbox):
Linas Vepstas <linasvepstas <at> 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’.
Reply sent
to
Andy Wingo <wingo <at> pobox.com>
:
You have taken responsibility.
(Mon, 20 Jun 2016 15:56:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
linasvepstas <at> gmail.com
:
bug acknowledged by developer.
(Mon, 20 Jun 2016 15:56:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 21221-done <at> debbugs.gnu.org (full text, mbox):
On Sun 09 Aug 2015 04:20, Linas Vepstas <linasvepstas <at> 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
Information forwarded
to
bug-guile <at> gnu.org
:
bug#21221
; Package
guile
.
(Tue, 21 Jun 2016 13:33:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 21221 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Jun 20, 2016 at 10:56 AM, GNU bug Tracking System <
help-debbugs <at> 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
[Message part 2 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 20 Jul 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 339 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.