all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan J Third <alan@idiocy.org>
To: Adrian Robert <adrian.b.robert@gmail.com>
Cc: Ian Eure <ian@digg.com>, Leo <sdl.web@gmail.com>, 3221@debbugs.gnu.org
Subject: bug#3221: 23.0.93; ns cannot handle nonascii file names
Date: Sat, 16 Jan 2016 17:06:17 +0000	[thread overview]
Message-ID: <m2k2n9a1yu.fsf@galloway.idiocy.org> (raw)
In-Reply-To: <4539FC21-8FA9-40F9-ABBD-75541DE82F9B@gmail.com> (Adrian Robert's message of "Thu, 23 Jul 2009 12:47:03 -0400")

Adrian Robert <adrian.b.robert@gmail.com> writes:

> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3221
>
> Hi,
>
>> After some investigation with Ian's help, I have found a workaround by
>> setting the language environment to UTF-8.
>>
>> The bug seems to be that Emacs.app is completely unaware of the
>> language
>> setting of OS X.
>
>
> I'd like to fix this.
>
> Do you know why it works from terminal?  Is there some code in emacs
> that reads the LANG or some other env setting and sets something in
> emacs?  Where?  What is the command to set the language environment?

OS X's terminal application sets the LANG environment variable, so when
Emacs is run from there it picks up LANG. When run from the GUI (dock,
or spotlight or whatever) OS X does *not* set the LANG variable, so
Emacs doesn't pick it up.

> While the various methods on the net to set up
> ~/.MacOSX/environment.plist might work, there ought to be some Cocoa
> way to detect language setting directly...

It looks like the right way to get the locale from OS X is something
like:

const char * locale = [[[NSLocale currentLocale] localeIdentifier] UTF8String];

HOWEVER, it appears the actual bug reported:

> 2. start Emacs from Finder
> 
> 3. M-! touch 求助.txt
> 
> No 求助.txt will be created instead, a file named .txt is created.

is fixed in emacs 25. Or, at least, I can't reproduce it.

Not having LANG set does break ispell checking with hunspell on OSX, for
me at least, so it would still be nice to have the locale stuff fixed.
Presumably there are other reasons for wanting Emacs to have the correct
locale, too.

Should that be a new bug report?
-- 
Alan Third





  parent reply	other threads:[~2016-01-16 17:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 16:47 bug#3221: 23.0.93; ns cannot handle nonascii file names Adrian Robert
2009-07-23 19:40 ` Leo
2009-07-23 22:52 ` Jason Rumney
2016-01-16 17:06 ` Alan J Third [this message]
2016-01-16 18:34   ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2009-05-05 14:36 Leo
2009-05-05 21:02 ` Leo

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=m2k2n9a1yu.fsf@galloway.idiocy.org \
    --to=alan@idiocy.org \
    --cc=3221@debbugs.gnu.org \
    --cc=adrian.b.robert@gmail.com \
    --cc=ian@digg.com \
    --cc=sdl.web@gmail.com \
    /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.