all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: rgm@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	Kenichi Handa <handa@gnu.org>
Cc: 15260@debbugs.gnu.org
Subject: bug#15260: cannot build in a directory with non-ascii characters
Date: Sat, 26 Oct 2013 10:50:06 +0300	[thread overview]
Message-ID: <83zjpwfp3l.fsf@gnu.org> (raw)
In-Reply-To: <8361slgnhk.fsf@gnu.org>

> Date: Fri, 25 Oct 2013 22:27:19 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 15260@debbugs.gnu.org
> 
> > Date: Fri, 25 Oct 2013 21:46:52 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > Cc: 15260@debbugs.gnu.org
> > 
> > > but there are still
> > > problems later on, again related to Emacs mistakenly believing that
> > > certain directories do not exist, when they do (Warning: arch-dependent
> > > data dir `...' No such file or directory; etc).
> > > 
> > > The "non-ascii srcdir == builddir" case fails even earlier, due to not
> > > finding etc.
> > 
> > OK, I will take a closer look.  Thanks for the info.
> 
> I think I see the problem.  All those PATH_* variables that come from
> epaths.h yield encoded file names (because they were written by the
> shell).  But we never decode them before using them in init_callproc
> and init_callproc_1.  Similar things happen with decode_env_path: it
> calls 'getenv', but never decodes the values it gets from that.
> 
> I will take a crack on fixing these.

We definitely need to decode file names in init_callproc_1,
init_callproc, and init_lread.

But here's where things get hairy: when temacs starts, preloaded Lisp
files are not yet loaded, and consequently file-name-coding-system and
default-file-name-coding-system are both nil.  In such a case,
currently DECODE_FILE is a no-op.

So we need some way of getting temacs to know what coding-system to
use to decode file names during its initialization phase, without
relying on the database we have in locale-language-names.  This
probably calls for a separate variable, init-file-name-coding-system,
say.  But how to assign a correct value to it?

I understand that most Posix systems nowadays use UTF-8 for file
names, so I guess we can fall back on that.  On MS-Windows, there's a
system call that returns the necessary information, so there's no
problem for MS-Windows.  The question is what to do for Posix systems
that don't use UTF-8?  I see 2 possibilities:

 . Try to parse the value of LANG with some shell or Sed script, and
   come up with a suitable value.

 . Ask the user to specify the encoding as a switch to the configure
   script.

In both cases, communicate the value to temacs via --eval on its
command line.

Comments and opinions are welcome.





  reply	other threads:[~2013-10-26  7:50 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 17:46 bug#15260: cannot build in a directory with non-ascii characters Glenn Morris
2013-10-23 20:48 ` Glenn Morris
2013-10-24 18:25   ` Eli Zaretskii
2013-10-24 18:35     ` Glenn Morris
2013-10-25 14:25       ` Eli Zaretskii
2013-10-25 17:08         ` Glenn Morris
2013-10-25 18:31           ` Eli Zaretskii
2013-10-25 18:40             ` Glenn Morris
2013-10-25 18:46               ` Eli Zaretskii
2013-10-25 19:27                 ` Eli Zaretskii
2013-10-26  7:50                   ` Eli Zaretskii [this message]
2013-10-26 19:15                     ` Glenn Morris
2013-10-26 20:04                       ` Eli Zaretskii
2013-10-27  3:56                         ` Eli Zaretskii
2013-10-27 16:19                           ` Eli Zaretskii
2013-10-27 19:02                             ` Eli Zaretskii
2013-10-27 19:43                               ` Eli Zaretskii
2013-10-27  4:28                     ` Stefan Monnier
2013-10-27 16:11                       ` Eli Zaretskii
2013-10-28  0:30                         ` Stefan Monnier
2013-10-28  3:39                           ` Eli Zaretskii
2013-10-28  4:05                             ` Stefan Monnier
2013-10-28 16:47                               ` Eli Zaretskii
2013-10-28 18:33                                 ` Eli Zaretskii
2013-10-28 22:00                                   ` Glenn Morris
2013-10-29  3:42                                     ` Eli Zaretskii
2013-10-29  1:35                                   ` Stefan Monnier
2013-10-29  3:47                                     ` Eli Zaretskii
2013-10-29 13:56                                       ` Stefan Monnier
2013-10-30 18:19                                         ` Eli Zaretskii
2013-10-31  1:01                                           ` Stefan Monnier
2013-10-31  3:47                                             ` Eli Zaretskii
2013-10-31 13:40                                               ` Stefan Monnier
2013-10-31 16:25                                                 ` Eli Zaretskii
2013-10-31 18:04                                                   ` Stefan Monnier
2013-10-31 17:59                                               ` Eli Zaretskii
2013-10-31 19:24                                                 ` Stefan Monnier
2013-10-31 19:33                                                   ` Eli Zaretskii
2013-11-01  9:27                                                     ` Eli Zaretskii
2013-11-01 12:33                                                       ` Stefan Monnier
2013-11-04 17:37                                                         ` Eli Zaretskii
2013-11-04 17:35                                                 ` Eli Zaretskii
2013-11-04 18:38                                                   ` Stefan Monnier
2013-10-31 17:16                                             ` Eli Zaretskii
2013-10-31 18:09                                               ` Stefan Monnier
2013-10-31 18:37                                                 ` Eli Zaretskii
2013-10-31 19:41                                                   ` Eli Zaretskii
2013-11-01 13:58                                     ` Kenichi Handa
2013-10-31 21:45                                 ` Glenn Morris
2013-11-01  7:45                                   ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=83zjpwfp3l.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=15260@debbugs.gnu.org \
    --cc=handa@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rgm@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.