* utf-translate-cjk-mode question
@ 2003-04-21 18:01 Kai Großjohann
2003-04-25 13:59 ` Kai Großjohann
2003-05-01 4:45 ` Kenichi Handa
0 siblings, 2 replies; 4+ messages in thread
From: Kai Großjohann @ 2003-04-21 18:01 UTC (permalink / raw)
I have some questions about utf-translate-cjk-mode -- I think it
might not be working, so I'm trying to understand it. I probably
b0rked it when I changed it to use define-minor-mode. It's rather
embarrassing :-/
In my ~/.emacs file, I have this piece of code:
(when (fboundp 'utf-translate-cjk-mode)
(let ((current-language-environment "Chinese-GB"))
(utf-translate-cjk-mode 1)))
I start Emacs. I open a new file. I say C-u C-\ chinese-py RET. I
then type "nihao" into the buffer. I say C-x RET f utf-8 RET. Then
I try to save the buffer.
Emacs tells me that it can't encode the Chinese characters, and it
tried iso-latin-1 and utf-8 as encodings, and now it's suggesting
gb2312 as the encoding to use.
Is utf-translate-cjk-mode supposed to enable me to store the file as
utf-8?
The second question contains the code itself. I tried to just copy
and paste it from the original defcustom. But maybe I did something
wrong. After loading all the subst-foo files, there is a let
statement that binds the symbol `table'. But after this, nothing is
done with that symbol -- it does not appear to be accessed after
being populated. I also looked in version 1.27 (the last version
before my change), and there, too, the symbol `table' does not appear
to be accessed.
What is going on here? Is there some kind of magic?
I have the nagging feeling that the `table' needs to be passed to
define-translation-table somehow, but I can't find the code that used
to do that.
--
file-error; Data: (Opening input file no such file or directory ~/.signature)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: utf-translate-cjk-mode question
2003-04-21 18:01 utf-translate-cjk-mode question Kai Großjohann
@ 2003-04-25 13:59 ` Kai Großjohann
2003-05-01 4:45 ` Kenichi Handa
1 sibling, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2003-04-25 13:59 UTC (permalink / raw)
kai.grossjohann@gmx.net (Kai Großjohann) writes:
> In my ~/.emacs file, I have this piece of code:
>
> (when (fboundp 'utf-translate-cjk-mode)
> (let ((current-language-environment "Chinese-GB"))
> (utf-translate-cjk-mode 1)))
>
> I start Emacs. I open a new file. I say C-u C-\ chinese-py RET. I
> then type "nihao" into the buffer. I say C-x RET f utf-8 RET. Then
> I try to save the buffer.
>
> Emacs tells me that it can't encode the Chinese characters, and it
> tried iso-latin-1 and utf-8 as encodings, and now it's suggesting
> gb2312 as the encoding to use.
I've now tried (encode-coding-region (point-min) (point-max) 'utf-8)
on that buffer. This produces \344\275\240\345\245\275 which I guess
might be right (but I didn't check).
So why can Emacs encode the buffer into UTF-8 but can't save the
buffer in UTF-8 encoding?
coding-category-list contains coding-category-utf-8 as the last
element.
I'm quite confused now.
--
file-error; Data: (Opening input file no such file or directory ~/.signature)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: utf-translate-cjk-mode question
2003-04-21 18:01 utf-translate-cjk-mode question Kai Großjohann
2003-04-25 13:59 ` Kai Großjohann
@ 2003-05-01 4:45 ` Kenichi Handa
2003-05-02 7:22 ` Kai Großjohann
1 sibling, 1 reply; 4+ messages in thread
From: Kenichi Handa @ 2003-05-01 4:45 UTC (permalink / raw)
Cc: emacs-devel
Sorry for the late response on this matter.
In article <84adej4tmj.fsf@lucy.is.informatik.uni-duisburg.de>, kai.grossjohann@gmx.net (Kai Großjohann) writes:
> In my ~/.emacs file, I have this piece of code:
> (when (fboundp 'utf-translate-cjk-mode)
> (let ((current-language-environment "Chinese-GB"))
> (utf-translate-cjk-mode 1)))
> I start Emacs. I open a new file. I say C-u C-\ chinese-py RET. I
> then type "nihao" into the buffer. I say C-x RET f utf-8 RET. Then
> I try to save the buffer.
> Emacs tells me that it can't encode the Chinese characters, and it
> tried iso-latin-1 and utf-8 as encodings, and now it's suggesting
> gb2312 as the encoding to use.
> Is utf-translate-cjk-mode supposed to enable me to store the file as
> utf-8?
Yes, and this bug is my fault. My previous change to
find-coding-systems-region-internal was incomplete. I've
just installed a fix. Please try again with the latest
HEAD.
> The second question contains the code itself. I tried to just copy
> and paste it from the original defcustom. But maybe I did something
> wrong. After loading all the subst-foo files, there is a let
> statement that binds the symbol `table'. But after this, nothing is
> done with that symbol -- it does not appear to be accessed after
> being populated. I also looked in version 1.27 (the last version
> before my change), and there, too, the symbol `table' does not appear
> to be accessed.
This is also my fault. When I made register-char-codings
obsolete, I forgot to delete this unnecessary code.
---
Ken'ichi HANDA
handa@m17n.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: utf-translate-cjk-mode question
2003-05-01 4:45 ` Kenichi Handa
@ 2003-05-02 7:22 ` Kai Großjohann
0 siblings, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2003-05-02 7:22 UTC (permalink / raw)
Kenichi Handa <handa@m17n.org> writes:
> In article <84adej4tmj.fsf@lucy.is.informatik.uni-duisburg.de>, kai.grossjohann@gmx.net (Kai Großjohann) writes:
>
>> Emacs tells me that it can't encode the Chinese characters, and it
>> tried iso-latin-1 and utf-8 as encodings, and now it's suggesting
>> gb2312 as the encoding to use.
>
>> Is utf-translate-cjk-mode supposed to enable me to store the file as
>> utf-8?
>
> Yes, and this bug is my fault. My previous change to
> find-coding-systems-region-internal was incomplete. I've
> just installed a fix. Please try again with the latest
> HEAD.
I waited a bit until head would compile again. This morning, it did,
and I tested, and it works!
Thanks a lot.
>> The second question contains the code itself. I tried to just copy
>> and paste it from the original defcustom. But maybe I did something
>> wrong. After loading all the subst-foo files, there is a let
>> statement that binds the symbol `table'. But after this, nothing is
>> done with that symbol -- it does not appear to be accessed after
>> being populated. I also looked in version 1.27 (the last version
>> before my change), and there, too, the symbol `table' does not appear
>> to be accessed.
>
> This is also my fault. When I made register-char-codings
> obsolete, I forgot to delete this unnecessary code.
Ah, it's gone now.
And it works to turn utf-translate-cjk-mode on, and it also works to
turn it off. That's good.
I'm sorry to cause you so much work; I wish I grokked the Mule code
better to fix it myself.
--
file-error; Data: (Opening input file no such file or directory ~/.signature)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-05-02 7:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-21 18:01 utf-translate-cjk-mode question Kai Großjohann
2003-04-25 13:59 ` Kai Großjohann
2003-05-01 4:45 ` Kenichi Handa
2003-05-02 7:22 ` Kai Großjohann
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.