all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Q] GNu Emacs/MacOS X/Font Encoding
@ 2003-05-08 10:28 Rolf Marvin Bøe Lindgren
  2003-05-08 15:42 ` Andrew Choi
  0 siblings, 1 reply; 14+ messages in thread
From: Rolf Marvin Bøe Lindgren @ 2003-05-08 10:28 UTC (permalink / raw)



of late, tried and true mans to make GNU Emacs for MacOS X use Latin 1
rather than MacRoman have failed to work.  my .emacs, given the
following, will read Latin 1 from the keyboard and write Latin 1 to
files:

; --------
(set-language-environment "Latin-1") 
(set-keyboard-coding-system 'iso-latin-1)
(if (string= window-system "mac") 
    (setq mac-keyboard-text-encoding kTextEncodingISOLatin1))
(set-input-mode 
 (car (current-input-mode)) 
 (nth 1 (current-input-mode)) 
 0 
 7) 
(set-default-font 
 "-etl-fixed-medium-r-normal--16-160-75-75-m-160-iso8859-1")
; --------

but any change at all to font selection results in Latin 1 no longer
being read from the keyboard!  

the invocation

(set-default-font 
 "-etl-fixed-medium-r-normal--12-120-75-75-m-120-iso8859-1")

gives small sweet characters but with MacRoman encoding.  the following
invocation also used to provde Latin 1 keybard input (verbatim from the
FAQ), but currently, no go:

; --------
  (create-fontset-from-fontset-spec
"-apple-monaco-medium-r-normal--9-*-*-*-*-*-fontset-monaco,
ascii:-apple-monaco-medium-r-normal--9-90-75-75-m-90-mac-roman,
latin-iso8859-1:-apple-monaco-medium-r-normal--9-90-75-75-m-90-mac-roman")
(set-frame-font "fontset-monaco")
; --------

any and all clues greatly appreciated!

-- 
Rolf Lindgren                                            http://www.roffe.com/
roffe@tag.uio.no

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 10:28 [Q] GNu Emacs/MacOS X/Font Encoding Rolf Marvin Bøe Lindgren
@ 2003-05-08 15:42 ` Andrew Choi
  2003-05-08 16:39   ` Rolf Marvin Bøe Lindgren
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Choi @ 2003-05-08 15:42 UTC (permalink / raw)
  Cc: emacs-devel

Rolf Marvin Bøe Lindgren <r.m.b.lindgren@usit.uio.no> writes:

> [...] any change at all to font selection results in Latin 1 no longer
> being read from the keyboard!
> 
> the invocation
> 
> (set-default-font 
>  "-etl-fixed-medium-r-normal--12-120-75-75-m-120-iso8859-1")
> 
> gives small sweet characters but with MacRoman encoding.  [...]

Would you please give a concrete sequence of steps to demonstrate the
problem (what language keyboard is selected, which characters you typed,
and so on)?

I ask this because I cannot repeat the problem here.  Latin 1 characters
input works fine for me after I change the fonts.  My Emacs is from the
CVS on May 2.

Note also that ETL fixed has own 16-point and 14-point versions.  When
you say 12, Emacs probably uses 14.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 15:42 ` Andrew Choi
@ 2003-05-08 16:39   ` Rolf Marvin Bøe Lindgren
  2003-05-08 18:41     ` Andrew Choi
  0 siblings, 1 reply; 14+ messages in thread
From: Rolf Marvin Bøe Lindgren @ 2003-05-08 16:39 UTC (permalink / raw)
  Cc: emacs-devel

[Andrew Choi]
 
| Would you please give a concrete sequence of steps to demonstrate the
| problem (what language keyboard is selected, which characters you typed,
| and so on)?

the characters I typed were æ ø å Æ Å Ø.  the output was

c with acute accent
r with hacek
l with acute accent

C with acute accent
R with hacek
L with acute accent

the internal representation is correct.  when I set the font back to
"-etl-fixed-medium-r-normal--16-160-75-75-m-160-iso8859-1" the character
were displayed as expected.  this is a character display/font issue,
then, not a keyboard input issue.

this also goes for alt characters:  I get the expected result with the
default font, or with any font when switched back to the default font.

I use a Norwegian (equivalent to Danish) keyboard.


-- 
Rolf Lindgren                                            http://www.roffe.com/
roffe@tag.uio.no

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 16:39   ` Rolf Marvin Bøe Lindgren
@ 2003-05-08 18:41     ` Andrew Choi
  2003-05-08 20:05       ` Rolf Marvin Bøe Lindgren
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Choi @ 2003-05-08 18:41 UTC (permalink / raw)


Rolf Marvin Bøe Lindgren <r.m.b.lindgren@usit.uio.no> writes:

> the characters I typed were æ ø å Æ Å Ø.  the output was
> 
> c with acute accent
> r with hacek
> l with acute accent
> 
> C with acute accent
> R with hacek
> L with acute accent
> 
> the internal representation is correct.  when I set the font back to
> "-etl-fixed-medium-r-normal--16-160-75-75-m-160-iso8859-1" the character
> were displayed as expected.  this is a character display/font issue,
> then, not a keyboard input issue.
> 
> this also goes for alt characters:  I get the expected result with the
> default font, or with any font when switched back to the default font.
> 
> I use a Norwegian (equivalent to Danish) keyboard.

I'm sorry I still cannot repeat the problem.  This is what I did.  I
saved your post in a file.  It contains the letters (in Latin 1
encoding)

  æ ø å Æ Å Ø

which are the letters next to `L' and `P' on the Norwegian keyboard.  I
then run the May 2 version of Emacs from CVS from command line as
follows (the specific path is just where it is on my machine).

  Documents/Emacs/emacs/mac/Emacs.app/Contents/MacOS/Emacs -q

Visited the saved file.  The letters show up fine.  Then I evaluate the
expression

  (set-default-font "-etl-fixed-medium-r-normal--12-120-75-75-m-120-iso8859-1")

Those letters are still displayed correctly (they're in 14-point fixed
now).

Then I evaluate

  (create-fontset-from-fontset-spec
"-apple-monaco-medium-r-normal--9-*-*-*-*-*-fontset-monaco,
ascii:-apple-monaco-medium-r-normal--9-90-75-75-m-90-mac-roman,
latin-iso8859-1:-apple-monaco-medium-r-normal--9-90-75-75-m-90-mac-roman")

and then

  (set-frame-font "fontset-monaco")

Those letters are still displayed correctly (they're in 9-point
Monaco now).

Could you please repeat these steps and see if you get the same
results?  Please use a recent CVS version.

Also this question may be more suitable elsewhere, like gnu.emacs.help.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 18:41     ` Andrew Choi
@ 2003-05-08 20:05       ` Rolf Marvin Bøe Lindgren
  2003-05-08 20:12         ` Andrew Choi
  0 siblings, 1 reply; 14+ messages in thread
From: Rolf Marvin Bøe Lindgren @ 2003-05-08 20:05 UTC (permalink / raw)
  Cc: emacs-devel

[Andrew Choi]

| I'm sorry I still cannot repeat the problem.  This is what I did.  I
| saved your post in a file.  It contains the letters (in Latin 1
| encoding)
| 
|   æ ø å Æ Å Ø
 
I found it. the problem only occurs when EMACS_UNIBYTE is set.

I  (along, I presume, with all or most Europeans) cannot use Emacs in
multibyte mode.  so this _must_ work in unibyte mode.  with 

          ~/.MacOSX/environment.plist 

containing

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>EMACS_UNIBYTE</key>
        <string>TRUE</string>
</dict>
</plist>

Emacs starts in unibyte mode, the problematic characters are
represented as one byte, but Emacs displays them wrong.  without this,
Emacs displays the problematic characters correcly, but they are
represented with two bytes as UTF-8 which is no good.  

-- 
Rolf Lindgren                                            http://www.roffe.com/
roffe@tag.uio.no

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 20:05       ` Rolf Marvin Bøe Lindgren
@ 2003-05-08 20:12         ` Andrew Choi
  2003-05-08 20:35           ` Rolf Marvin Bøe Lindgren
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Choi @ 2003-05-08 20:12 UTC (permalink / raw)


Rolf Marvin Bøe Lindgren <r.m.b.lindgren@usit.uio.no> writes:

> [...] I (along, I presume, with all or most Europeans) cannot use
> Emacs in multibyte mode.  so this _must_ work in unibyte mode.  [...]

Why not?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 20:12         ` Andrew Choi
@ 2003-05-08 20:35           ` Rolf Marvin Bøe Lindgren
  2003-05-08 20:57             ` Andrew Choi
                               ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Rolf Marvin Bøe Lindgren @ 2003-05-08 20:35 UTC (permalink / raw)
  Cc: emacs-devel

[Rolf Marvin Bøe Lindgren]

| [...] I (along, I presume, with all or most Europeans) cannot use
| Emacs in multibyte mode.  so this _must_ work in unibyte mode.  [...]

[Andrew Choi]

| Why not?

as I mentioned, LaTeX for instance does not understand multibyte
characeters.  in fact most software does not.  in order to avoid having
to filter all our files before feeding them to other software, we need
a GNU Emacs that can read and write Latin 1 properly using unibyte.  

-- 
Rolf Lindgren                                            http://www.roffe.com/
roffe@tag.uio.no

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 20:35           ` Rolf Marvin Bøe Lindgren
@ 2003-05-08 20:57             ` Andrew Choi
  2003-05-08 21:20             ` Stefan Monnier
  2003-05-09  1:26             ` Miles Bader
  2 siblings, 0 replies; 14+ messages in thread
From: Andrew Choi @ 2003-05-08 20:57 UTC (permalink / raw)


Rolf Marvin Bøe Lindgren <r.m.b.lindgren@usit.uio.no> writes:

> | [...] I (along, I presume, with all or most Europeans) cannot use
> | Emacs in multibyte mode.  so this _must_ work in unibyte mode.  [...]
> 
> [Andrew Choi]
> 
> | Why not?
> 
> as I mentioned, LaTeX for instance does not understand multibyte
> characeters.  in fact most software does not.  in order to avoid having
> to filter all our files before feeding them to other software, we need
> a GNU Emacs that can read and write Latin 1 properly using unibyte.  

I cannot believe this is true.

But such /user/ questions should not be discussed here any further.
Perhaps you should post a new question to gnu.emacs.help asking people
how to set up Emacs correctly to handle Latin 1 characters without using
unibyte.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 20:35           ` Rolf Marvin Bøe Lindgren
  2003-05-08 20:57             ` Andrew Choi
@ 2003-05-08 21:20             ` Stefan Monnier
  2003-05-08 22:43               ` Rolf Marvin Bøe Lindgren
  2003-05-09  1:26             ` Miles Bader
  2 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2003-05-08 21:20 UTC (permalink / raw)
  Cc: emacs-devel

> [Rolf Marvin Bøe Lindgren]
> 
> | [...] I (along, I presume, with all or most Europeans) cannot use
> | Emacs in multibyte mode.  so this _must_ work in unibyte mode.  [...]
> 
> [Andrew Choi]
> 
> | Why not?
> 
> as I mentioned, LaTeX for instance does not understand multibyte
> characeters.  in fact most software does not.  in order to avoid having
> to filter all our files before feeding them to other software, we need
> a GNU Emacs that can read and write Latin 1 properly using unibyte.  

Andrew's question was not very direct: we can guess why you think you
need unibyte mode, but any use of Emacs in multibyte mode (i.e. in
its default mode) that "doesn't do what you want" is a bug.

Most people in the latin-1 world use Emacs in multibyte mode
with great success, including using LaTeX.  So you'll need
to show a step by step situation where Emacs fails to do what
it should.  And then we'll either fix the problem or tell
you where you did something wrong.


	Stefan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 21:20             ` Stefan Monnier
@ 2003-05-08 22:43               ` Rolf Marvin Bøe Lindgren
  2003-05-08 22:45                 ` Rolf Marvin Bøe Lindgren
                                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Rolf Marvin Bøe Lindgren @ 2003-05-08 22:43 UTC (permalink / raw)
  Cc: emacs-devel

[Stefan Monnier]

| Most people in the latin-1 world use Emacs in multibyte mode
| with great success, including using LaTeX.  So you'll need
| to show a step by step situation where Emacs fails to do what
| it should.  And then we'll either fix the problem or tell
| you where you did something wrong.

posting to Newsgroups from Gnus.

If I have to stop using unibyte mode, I need to shop for another
newsreader, because people who use newsreaders that don't grok UTF-8

- get two characters wherever I have a character whose ordinal value is
  < 128. 
- mail me and ask me to fix my newsreader.

the LaTeX problem, though, seems to have been fixed.  that's a bit
embarassing actually.


-- 
Rolf Lindgren                                            http://www.roffe.com/
roffe@tag.uio.no

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 22:43               ` Rolf Marvin Bøe Lindgren
@ 2003-05-08 22:45                 ` Rolf Marvin Bøe Lindgren
  2003-05-08 22:59                 ` Stefan Monnier
  2003-05-09 17:07                 ` Richard Stallman
  2 siblings, 0 replies; 14+ messages in thread
From: Rolf Marvin Bøe Lindgren @ 2003-05-08 22:45 UTC (permalink / raw)
  Cc: Stefan Monnier

[Rolf Marvin Bøe Lindgren]

| - get two characters wherever I have a character whose ordinal value is
|   < 128. 

that should be > 128.  sorry.

-- 
Rolf Lindgren                                            http://www.roffe.com/
roffe@tag.uio.no

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 22:43               ` Rolf Marvin Bøe Lindgren
  2003-05-08 22:45                 ` Rolf Marvin Bøe Lindgren
@ 2003-05-08 22:59                 ` Stefan Monnier
  2003-05-09 17:07                 ` Richard Stallman
  2 siblings, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2003-05-08 22:59 UTC (permalink / raw)
  Cc: Stefan Monnier

> | Most people in the latin-1 world use Emacs in multibyte mode
> | with great success, including using LaTeX.  So you'll need
> | to show a step by step situation where Emacs fails to do what
> | it should.  And then we'll either fix the problem or tell
> | you where you did something wrong.
> 
> posting to Newsgroups from Gnus.

As Andrew says, this has nothing to do with emacs-devel and should
be on gnu.emacs.help instead.  Furthermore, your above 5 words
do not constitute a "step by step" description of the problem.
I use Gnus all the time with latin-1 in multibyte mode (like the
majority of Gnus users, most likely) and it works great.
Also, all such issues can only be meaningfully investigated if
you provide your language settings (locale and stuff).
M-x report-emacs-bug would do that for you.

But I do recall a bug in Emacs-21.3 where Gnus uses utf-16
when it shouldn't.  I don't think it applies in a latin-1 environment
bug you might want to check archives of gnu.emacs.help (e.g.
on groups.google.com) for it.



	Stefan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 20:35           ` Rolf Marvin Bøe Lindgren
  2003-05-08 20:57             ` Andrew Choi
  2003-05-08 21:20             ` Stefan Monnier
@ 2003-05-09  1:26             ` Miles Bader
  2 siblings, 0 replies; 14+ messages in thread
From: Miles Bader @ 2003-05-09  1:26 UTC (permalink / raw)
  Cc: emacs-devel

Rolf Marvin Bøe Lindgren <r.m.b.lindgren@usit.uio.no> writes:
> in order to avoid having to filter all our files before feeding them
> to other software, we need a GNU Emacs that can read and write Latin 1
> properly using unibyte.

Of course emacs can read and write latin 1 just fine in multibyte mode.

I'm not sure how many people still use emacs in unibyte mode, but my
impression* is that it's the minority these days, even in europe -- Emacs
simply works a lot better in multibyte mode (even if you only ever use a
single character set).

Unibyte mode is at best a flaky hack left over for historical reasons.

* Of course I base my opinion on what I've seen personally, which
  probably means my viewpoint is biased in favor of emacs experts.
  Though one can get some idea from watching bug reports, what the
  unwashed masses are doing is less clear.

-Miles
-- 
`Cars give people wonderful freedom and increase their opportunities.
 But they also destroy the environment, to an extent so drastic that
 they kill all social life' (from _A Pattern Language_)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Q] GNu Emacs/MacOS X/Font Encoding
  2003-05-08 22:43               ` Rolf Marvin Bøe Lindgren
  2003-05-08 22:45                 ` Rolf Marvin Bøe Lindgren
  2003-05-08 22:59                 ` Stefan Monnier
@ 2003-05-09 17:07                 ` Richard Stallman
  2 siblings, 0 replies; 14+ messages in thread
From: Richard Stallman @ 2003-05-09 17:07 UTC (permalink / raw)
  Cc: monnier+gnu/emacs

    | Most people in the latin-1 world use Emacs in multibyte mode
    | with great success, including using LaTeX.  So you'll need
    | to show a step by step situation where Emacs fails to do what
    | it should.  And then we'll either fix the problem or tell
    | you where you did something wrong.

    posting to Newsgroups from Gnus.

It ought to work, but there could be a bug.  If you send a *precise
test case* we may be able to fix it.

Stephan wrote

    As Andrew says, this has nothing to do with emacs-devel and should
    be on gnu.emacs.help instead.

but that is not necessarily true..  This MIGHT be a real bug.  If it
is, discussing it with us is appropriate.  However, I think the Gnus
developers will have to be the first ones to work on it.

But nobody can debug it without a precise test case.  So please read
the Bugs section in the Emacs manual, and write a report following
those guidelines.  Then we could really fix something.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-05-09 17:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-08 10:28 [Q] GNu Emacs/MacOS X/Font Encoding Rolf Marvin Bøe Lindgren
2003-05-08 15:42 ` Andrew Choi
2003-05-08 16:39   ` Rolf Marvin Bøe Lindgren
2003-05-08 18:41     ` Andrew Choi
2003-05-08 20:05       ` Rolf Marvin Bøe Lindgren
2003-05-08 20:12         ` Andrew Choi
2003-05-08 20:35           ` Rolf Marvin Bøe Lindgren
2003-05-08 20:57             ` Andrew Choi
2003-05-08 21:20             ` Stefan Monnier
2003-05-08 22:43               ` Rolf Marvin Bøe Lindgren
2003-05-08 22:45                 ` Rolf Marvin Bøe Lindgren
2003-05-08 22:59                 ` Stefan Monnier
2003-05-09 17:07                 ` Richard Stallman
2003-05-09  1:26             ` Miles Bader

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.