From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.user Subject: Re: string-ports issue on Windows Date: Tue, 16 Apr 2019 17:34:30 +0300 Message-ID: <83pnpmggsp.fsf@gnu.org> References: Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="159486"; mail-complaints-to="usenet@blaine.gmane.org" Cc: guile-user@gnu.org To: Christopher Lam Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Apr 16 16:35:02 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGPAs-000fL9-1f for guile-user@m.gmane.org; Tue, 16 Apr 2019 16:35:02 +0200 Original-Received: from localhost ([127.0.0.1]:37836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGPAr-0002y5-22 for guile-user@m.gmane.org; Tue, 16 Apr 2019 10:35:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGPAT-0002xz-P3 for guile-user@gnu.org; Tue, 16 Apr 2019 10:34:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGPAS-0006CB-Lw; Tue, 16 Apr 2019 10:34:37 -0400 Original-Received: from [176.228.60.248] (port=4481 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hGPAR-0003ue-Qp; Tue, 16 Apr 2019 10:34:36 -0400 In-reply-to: (message from Christopher Lam on Tue, 16 Apr 2019 04:13:14 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15390 Archived-At: > From: Christopher Lam > Date: Tue, 16 Apr 2019 04:13:14 +0000 > > I'm struggling with string-ports on Windows. Which version of Guile are you using, and where/how did you obtain the Windows binary? > Last para of > https://www.gnu.org/software/guile/manual/html_node/String-Ports.html > "With string ports, the port-encoding is treated differently than other > types of ports. When string ports are created, they do not inherit a > character encoding from the current locale. They are given a default locale > that allows them to handle all valid string characters." > > This causes a string-sanitize function to not run correctly in Windows. > (locale-encoding) says "CP1252" no matter what LANG or setlocale I try. > > The use case is to sanitize string for html, but on Windows it munges > extended-unicode. Can you show the code that doesn't work for you as you expected? At least the example in "String Ports" seems to work for me as I'd expect, with Guile 2.0.11.