unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Nala Ginrut <nalaginrut@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-user@gnu.org, Dima <dima@minignu.minidns.net>
Subject: Re: unicode support
Date: Wed, 02 Apr 2014 15:48:10 +0800	[thread overview]
Message-ID: <1396424890.17592.11.camel@Renee-desktop.suse> (raw)
In-Reply-To: <87vbuum4fv.fsf@yeeloong.lan>

On Mon, 2014-03-31 at 17:41 -0400, Mark H Weaver wrote:
> Игорь Гайсин <igor.gajsin@tts.tv> writes:
> 
> > Hi, dmitriy. Try to add this line to head your scripts
> >
> > (setlocale LC_ALL "")
> > (set-port-encoding! (current-input-port) "utf-8")
> > (set-port-encoding! (current-output-port) "utf-8")
> 
> The 'setlocale' call is indeed important.
> 

Yes, it is. And let me emphasize this again for any non latin-1 users.
Because it's so common that I was asked by others frequently.
My projects are heavily using CJK, so I always put it under shebang
lines to avoid "????" situation:
------------------------code-----------------------
#! /bin/env guile
!#
(setlocale LC_ALL "")
------------------------end------------------------
Don't forget this ;-)


> The next two lines shouldn't be needed, and would cause breakage on
> non-utf8 locales.
> 
>      Regards,
>        Mark
> 
> 
> > Dima <dima@minignu.minidns.net> writes:
> >
> >> Hi.
> >>    Did something change from guile 1.8.x to 2.0 with regards to unicode support.
> >>
> >> I have a script that has strings written on russian without much care, and it does not work on 2.0.
> >>
> >> I want to make sure whether there are changes in guile or something else.
> >>
> >> Thanks, regards,
> >>   Dima.
> 





      reply	other threads:[~2014-04-02  7:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31  5:18 unicode support Dima
2014-03-31  8:19 ` support Игорь Гайсин
2014-03-31 12:36   ` unicode support Ludovic Courtès
2014-03-31 21:41   ` Mark H Weaver
2014-04-02  7:48     ` Nala Ginrut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396424890.17592.11.camel@Renee-desktop.suse \
    --to=nalaginrut@gmail.com \
    --cc=dima@minignu.minidns.net \
    --cc=guile-user@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).