Re: Some characters cannot be mapped using "ANSI_X3.4-1968" character encoding.

812 views
Skip to first unread message

Fredrik Appelberg

unread,
Jun 13, 2013, 4:55:50 PM6/13/13
to emacs...@googlegroups.com
On Mon, Jun 10, 2013 at 9:23 PM, Torstein Krause Johansen <torstein....@gmail.com> wrote:
Hi all,

I've got problems with Java source files sporting international characters. It puzzles me as it all "looks" right, but of course there's something wrong somwhere:

- Emacs and eclimd are started from the shell where it's set up to handle UTF-8:

$ grep utf8 .bashrc
export LANG=en_GB.utf8
export LC_ALL=en_GB.utf8

- These locales exist:

$ locale -a
C
C.UTF-8
en_GB.utf8
POSIX

- Eclipse says in its preference dialogue that it's using UTF-8

- Emacs says the file in question is unicode (the modeline says U, can't remember which one it is exactly)

- Saving the file with UTF-8 explictly: C+x RET f utf-8 doesn't remedy the problem.

Oddly enough, it works on one of my other machines, so I know it _is_ possible :-)

What am I missing here?

Encoding problems are always a bitch. But how does the problem manifest itself? (I didn't really get it from reading the above, but then again it is kind of late and I'm very tired) :)

Cheers,
-- Fredrik

Torstein Krause Johansen

unread,
Jul 30, 2013, 4:05:30 PM7/30/13
to emacs...@googlegroups.com, fre...@appelberg.me
Hi there,
You're right I didn't give you the use case: I execute the emacs-eclim command, e.g. implement missing method, Emacs thinks, talks to eclim, but fails to update the buffer. It just displays the message "Some characters cannot be mapped using "ANSI_X3.4-1968character encoding" in the minibuffer.

Cheers,

-Torstein

fred-o

unread,
Aug 7, 2013, 11:32:29 AM8/7/13
to emacs...@googlegroups.com, fre...@appelberg.me
Hm. I just checked the eclim source. We try as best we can to translate the encoding name as reported by emacs to something that eclipse will accept; this is done using the lookup table eclim--file-coding-system-mapping. There are mappings for 'utf-8-dos', 'utf-8-unix' and 'utf-8-emacs-unix', but not 'utf-8'. 

If you evaluate '(eclim--current-encoding)' in the java source buffer, what do you get?

Cheers,
-- Fredrik


 

Torstein Krause Johansen

unread,
Aug 8, 2013, 3:03:18 AM8/8/13
to emacs...@googlegroups.com, fre...@appelberg.me
Good morning,

thanks for looking into this, it has bugged me for quite some time now.

fred-o <fredrik....@gmail.com> writes:

> Hm. I just checked the eclim source. We try as best we can to translate the
> encoding name as reported by emacs to something that eclipse will accept;
> this is done using the lookup table *eclim--file-coding-system-mapping*.
> There are mappings for 'utf-8-dos', 'utf-8-unix' and 'utf-8-emacs-unix',
> but not 'utf-8'.
>
> If you evaluate '(eclim--current-encoding)' in the java source buffer, what
> do you get?

"utf-8", indeed!

What could cause the different encoding? My emacs configuration is
identical on the two machines.

Cheers,

-Torstein

Reply all
Reply to author
Forward
0 new messages