all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Accents with po-mode
@ 2020-01-16  7:49 MENGUAL Jean-Philippe
  2020-01-16  9:57 ` Robert Pluim
  0 siblings, 1 reply; 14+ messages in thread
From: MENGUAL Jean-Philippe @ 2020-01-16  7:49 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

In PO mode, when I enter an accent (é è), when I end my typing (ctrl-c 
c), it is converted into \x0153 or other kind of code. AN idea why? My 
po file is utf8.

Thanks for your help

Regards

-- 
signature_jp_2
Logo Hypra 	JEAN-PHILIPPE MENGUAL
DIRECTEUR TECHNIQUE ET QUALITÉ
102, rue des poissonniers, 75018, Paris
Tel : +331 84 73 06 61 <tel:+33184730661> Mob : +336 76 34 93 37
<tel:+33676349337>
jpmengual@hypra.fr <mailto:jpmengual@hypra.fr>
www.hypra.fr <http://www.hypra.fr/>
Facebook Hypra <https://www.facebook.com/hyprasoftware/> Twitter Hypra 
<https://twitter.com/Hypra_> Linkedin Jean-Philippe 
<https://fr.linkedin.com/in/jean-philippe-mengual-800133135>




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

* Re: Accents with po-mode
  2020-01-16  7:49 Accents with po-mode MENGUAL Jean-Philippe
@ 2020-01-16  9:57 ` Robert Pluim
  2020-01-18  0:09   ` MENGUAL Jean-Philippe
  0 siblings, 1 reply; 14+ messages in thread
From: Robert Pluim @ 2020-01-16  9:57 UTC (permalink / raw)
  To: MENGUAL Jean-Philippe; +Cc: help-gnu-emacs

>>>>> On Thu, 16 Jan 2020 08:49:16 +0100, MENGUAL Jean-Philippe <mengualjeanphi@free.fr> said:

    Jean-Philippe> Hi,
    Jean-Philippe> In PO mode, when I enter an accent (é è), when I end my typing (ctrl-c
    Jean-Philippe> c), it is converted into \x0153 or other kind of code. AN idea why? My 
    Jean-Philippe> po file is utf8.

Which version of emacs is this? Also, how are you entering the
accents? I guess not with an emacs input method, since those donʼt
require C-c c.

You could try one of the many emacs input methods, eg

C-u C-\ french-prefix RET

lets you enter é by typing 'e

Robert



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

* Re: Accents with po-mode
  2020-01-16  9:57 ` Robert Pluim
@ 2020-01-18  0:09   ` MENGUAL Jean-Philippe
  2020-01-18  8:11     ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: MENGUAL Jean-Philippe @ 2020-01-18  0:09 UTC (permalink / raw)
  To: Robert Pluim; +Cc: help-gnu-emacs


Le 16/01/2020 à 10:57, Robert Pluim a écrit :
>>>>>> On Thu, 16 Jan 2020 08:49:16 +0100, MENGUAL Jean-Philippe <mengualjeanphi@free.fr> said:
> 
>      Jean-Philippe> Hi,
>      Jean-Philippe> In PO mode, when I enter an accent (é è), when I end my typing (ctrl-c
>      Jean-Philippe> c), it is converted into \x0153 or other kind of code. AN idea why? My
>      Jean-Philippe> po file is utf8.
> 
> Which version of emacs is this? Also, how are you entering the

26.3

> accents? I guess not with an emacs input method, since those donʼt
> require C-c c.

In PO mode, you need to do Enter to open a string to transalte, then 
translate,
then ctrl-c c to exit.

The problem appears if I open Emacs in tty or under a graphical 
terminal. c-u c-\ says that I use latin-1-prefix.

> 
> You could try one of the many emacs input methods, eg
> 
> C-u C-\ french-prefix RE
> 
> lets you enter é by typing 'e

Curious. 'e writes 'e, and é writes \351

I guess a recent update in my Debian Sid gives a problem but...

If we dont find any solution here I will report a bug

Thanks for your help

> 
> Robert
> 



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

* Re: Accents with po-mode
  2020-01-18  0:09   ` MENGUAL Jean-Philippe
@ 2020-01-18  8:11     ` Eli Zaretskii
  2020-01-18  9:09       ` MENGUAL Jean-Philippe
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2020-01-18  8:11 UTC (permalink / raw)
  To: help-gnu-emacs

> From: MENGUAL Jean-Philippe <mengualjeanphi@free.fr>
> Date: Sat, 18 Jan 2020 01:09:06 +0100
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> > C-u C-\ french-prefix RE
> > 
> > lets you enter é by typing 'e
> 
> Curious. 'e writes 'e, and é writes \351

What is the value returned by terminal-coding-system on your system?
And what is your locale (the value of environment variables LC_ALL or
LANG)?



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

* Re: Accents with po-mode
  2020-01-18  8:11     ` Eli Zaretskii
@ 2020-01-18  9:09       ` MENGUAL Jean-Philippe
  2020-01-18  9:38         ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: MENGUAL Jean-Philippe @ 2020-01-18  9:09 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

> 
> What is the value returned by terminal-coding-system on your system?

c-x RET says: Coding system for terminal display: nil

> And what is your locale (the value of environment variables LC_ALL or
> LANG)?

LC_ALL and LANG are fr_FR.UTF-8

Best regards




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

* Re: Accents with po-mode
  2020-01-18  9:09       ` MENGUAL Jean-Philippe
@ 2020-01-18  9:38         ` Eli Zaretskii
  2020-01-18 10:29           ` MENGUAL Jean-Philippe
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2020-01-18  9:38 UTC (permalink / raw)
  To: help-gnu-emacs

> From: MENGUAL Jean-Philippe <mengualjeanphi@free.fr>
> Date: Sat, 18 Jan 2020 10:09:35 +0100
> 
> > 
> > What is the value returned by terminal-coding-system on your system?
> 
> c-x RET says: Coding system for terminal display: nil

In a GUI session or a TTY session?

> > And what is your locale (the value of environment variables LC_ALL or
> > LANG)?
> 
> LC_ALL and LANG are fr_FR.UTF-8

And what is the value of buffer-file-coding-system of the buffer where
you have the PO mode turned on?



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

* Re: Accents with po-mode
  2020-01-18  9:38         ` Eli Zaretskii
@ 2020-01-18 10:29           ` MENGUAL Jean-Philippe
  2020-01-18 11:20             ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: MENGUAL Jean-Philippe @ 2020-01-18 10:29 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs


Le 18/01/2020 à 10:38, Eli Zaretskii a écrit :
>> From: MENGUAL Jean-Philippe <mengualjeanphi@free.fr>
>> Date: Sat, 18 Jan 2020 10:09:35 +0100
>>
>>>
>>> What is the value returned by terminal-coding-system on your system?
>>
>> c-x RET says: Coding system for terminal display: nil
> 
> In a GUI session or a TTY session?

Both give the result. c-x RET t says: "coding system for terminal 
display": nil

> 
>>> And what is your locale (the value of environment variables LC_ALL or
>>> LANG)?
>>
>> LC_ALL and LANG are fr_FR.UTF-8
> 
> And what is the value of buffer-file-coding-system of the buffer where
> you have the PO mode turned on?

c-x RET f gives: "coding system for saving file" (default: utf-8-unix)

Regards


> 



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

* Re: Accents with po-mode
  2020-01-18 10:29           ` MENGUAL Jean-Philippe
@ 2020-01-18 11:20             ` Eli Zaretskii
  2020-01-18 12:15               ` MENGUAL Jean-Philippe
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2020-01-18 11:20 UTC (permalink / raw)
  To: help-gnu-emacs

> From: MENGUAL Jean-Philippe <mengualjeanphi@free.fr>
> Date: Sat, 18 Jan 2020 11:29:56 +0100
> 
> >>> What is the value returned by terminal-coding-system on your system?
> >>
> >> c-x RET says: Coding system for terminal display: nil
> > 
> > In a GUI session or a TTY session?
> 
> Both give the result. c-x RET t says: "coding system for terminal 
> display": nil

That seems wrong in the TTY case.

> >>> And what is your locale (the value of environment variables LC_ALL or
> >>> LANG)?
> >>
> >> LC_ALL and LANG are fr_FR.UTF-8
> > 
> > And what is the value of buffer-file-coding-system of the buffer where
> > you have the PO mode turned on?
> 
> c-x RET f gives: "coding system for saving file" (default: utf-8-unix)

OK, so what version of PO mode are you using, and where can one get
it?  Also, what PO file are you editing in this case?

And finally, if you go to that \351 character and type "C-u C-x =",
what does Emacs show in the buffer it pops up?



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

* Re: Accents with po-mode
  2020-01-18 11:20             ` Eli Zaretskii
@ 2020-01-18 12:15               ` MENGUAL Jean-Philippe
  2020-01-18 12:42                 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: MENGUAL Jean-Philippe @ 2020-01-18 12:15 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

>>>
>>> And what is the value of buffer-file-coding-system of the buffer where
>>> you have the PO mode turned on?
>>
>> c-x RET f gives: "coding system for saving file" (default: utf-8-unix)
> 
> OK, so what version of PO mode are you using, and where can one get
> it?  Also, what PO file are you editing in this case?

I use the gettext-el 0.19.8.1 package from Debian sid.

I attach the PO file I am submitted.

> 
> And finally, if you go to that \351 character and type "C-u C-x =",
> what does Emacs show in the buffer it pops up?

Char: é (233, #o351, #xe9, file ...) point=3 of 2140 (0%) column=2

Regards

> 

[-- Attachment #2: octavia_5.0.1-1_templates.pot.gz --]
[-- Type: application/gzip, Size: 822 bytes --]

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

* Re: Accents with po-mode
  2020-01-18 12:15               ` MENGUAL Jean-Philippe
@ 2020-01-18 12:42                 ` Eli Zaretskii
  2020-01-18 15:18                   ` MENGUAL Jean-Philippe
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2020-01-18 12:42 UTC (permalink / raw)
  To: help-gnu-emacs

> From: MENGUAL Jean-Philippe <mengualjeanphi@free.fr>
> Date: Sat, 18 Jan 2020 13:15:44 +0100
> 
> > OK, so what version of PO mode are you using, and where can one get
> > it?  Also, what PO file are you editing in this case?
> 
> I use the gettext-el 0.19.8.1 package from Debian sid.
> 
> I attach the PO file I am submitted.
> 
> > 
> > And finally, if you go to that \351 character and type "C-u C-x =",
> > what does Emacs show in the buffer it pops up?
> 
> Char: é (233, #o351, #xe9, file ...) point=3 of 2140 (0%) column=2

So Emacs shows the correct character in the buffer popped up by
"C-u C-x =", but it shows \351 for the same character in the buffer
where you edit the PO file?

And btw, why does it say "point=3"? are you inserting this character
in the commentary at the beginning of the PO file?



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

* Re: Accents with po-mode
  2020-01-18 12:42                 ` Eli Zaretskii
@ 2020-01-18 15:18                   ` MENGUAL Jean-Philippe
  2020-01-18 15:33                     ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: MENGUAL Jean-Philippe @ 2020-01-18 15:18 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs


Le 18/01/2020 à 13:42, Eli Zaretskii a écrit :
>> From: MENGUAL Jean-Philippe <mengualjeanphi@free.fr>
>> Date: Sat, 18 Jan 2020 13:15:44 +0100
>>
>>> OK, so what version of PO mode are you using, and where can one get
>>> it?  Also, what PO file are you editing in this case?
>>
>> I use the gettext-el 0.19.8.1 package from Debian sid.
>>
>> I attach the PO file I am submitted.
>>
>>>
>>> And finally, if you go to that \351 character and type "C-u C-x =",
>>> what does Emacs show in the buffer it pops up?
>>
>> Char: é (233, #o351, #xe9, file ...) point=3 of 2140 (0%) column=2
> 
> So Emacs shows the correct character in the buffer popped up by
> "C-u C-x =", but it shows \351 for the same character in the buffer
> where you edit the PO file?

Indeed

> 
> And btw, why does it say "point=3"? are you inserting this character
> in the commentary at the beginning of the PO file?

Yes, for this test. I get the same result in a string, but to make the 
test easier I did it in the commentary area

Regards

> 



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

* Re: Accents with po-mode
  2020-01-18 15:18                   ` MENGUAL Jean-Philippe
@ 2020-01-18 15:33                     ` Eli Zaretskii
  2020-01-18 15:43                       ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2020-01-18 15:33 UTC (permalink / raw)
  To: help-gnu-emacs

> From: MENGUAL Jean-Philippe <mengualjeanphi@free.fr>
> Date: Sat, 18 Jan 2020 16:18:11 +0100
> 
> >> Char: é (233, #o351, #xe9, file ...) point=3 of 2140 (0%) column=2
> > 
> > So Emacs shows the correct character in the buffer popped up by
> > "C-u C-x =", but it shows \351 for the same character in the buffer
> > where you edit the PO file?
> 
> Indeed

Interesting

So please start Emacs anew, and show all the commands you type to
reproduce this problem, starting from visiting the PO file you edit,
and ending with whatever you do to insert é which displays as \351.



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

* Re: Accents with po-mode
  2020-01-18 15:33                     ` Eli Zaretskii
@ 2020-01-18 15:43                       ` Eli Zaretskii
  2020-01-19  0:45                         ` MENGUAL Jean-Philippe
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2020-01-18 15:43 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 18 Jan 2020 17:33:56 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: MENGUAL Jean-Philippe <mengualjeanphi@free.fr>
> > Date: Sat, 18 Jan 2020 16:18:11 +0100
> > 
> > >> Char: é (233, #o351, #xe9, file ...) point=3 of 2140 (0%) column=2
> > > 
> > > So Emacs shows the correct character in the buffer popped up by
> > > "C-u C-x =", but it shows \351 for the same character in the buffer
> > > where you edit the PO file?
> > 
> > Indeed
> 
> Interesting

Actually, I think I know what happens: the buffer in which you edit
the PO file is a unibyte buffer.

So I suggest to replace CHARSET in this line:

  "Content-Type: text/plain; charset=CHARSET\n"

with

  "Content-Type: text/plain; charset=UTF-8\n"

then save the buffer and visit the file again.  Now these problems
should go away.




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

* Re: Accents with po-mode
  2020-01-18 15:43                       ` Eli Zaretskii
@ 2020-01-19  0:45                         ` MENGUAL Jean-Philippe
  0 siblings, 0 replies; 14+ messages in thread
From: MENGUAL Jean-Philippe @ 2020-01-19  0:45 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

oh marevelous! That is it! Many thanks! I did not think the content of 
the PO file could have a consequence about the buffer behavior in Emacs. 
The problem is now fixed, many thanks!

Best regards


Logo Hypra 	JEAN-PHILIPPE MENGUAL
DIRECTEUR TECHNIQUE ET QUALITÉ
102, rue des poissonniers, 75018, Paris
Tel : +331 84 73 06 61 <tel:+33184730661> Mob : +336 76 34 93 37
<tel:+33676349337>
jpmengual@hypra.fr <mailto:jpmengual@hypra.fr>
www.hypra.fr <http://www.hypra.fr/>
Facebook Hypra <https://www.facebook.com/hyprasoftware/> Twitter Hypra
<https://twitter.com/Hypra_> Linkedin Jean-Philippe
<https://fr.linkedin.com/in/jean-philippe-mengual-800133135>



Le 18/01/2020 à 16:43, Eli Zaretskii a écrit :
>> Date: Sat, 18 Jan 2020 17:33:56 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>>
>>> From: MENGUAL Jean-Philippe <mengualjeanphi@free.fr>
>>> Date: Sat, 18 Jan 2020 16:18:11 +0100
>>>
>>>>> Char: é (233, #o351, #xe9, file ...) point=3 of 2140 (0%) column=2
>>>>
>>>> So Emacs shows the correct character in the buffer popped up by
>>>> "C-u C-x =", but it shows \351 for the same character in the buffer
>>>> where you edit the PO file?
>>>
>>> Indeed
>>
>> Interesting
> 
> Actually, I think I know what happens: the buffer in which you edit
> the PO file is a unibyte buffer.
> 
> So I suggest to replace CHARSET in this line:
> 
>    "Content-Type: text/plain; charset=CHARSET\n"
> 
> with
> 
>    "Content-Type: text/plain; charset=UTF-8\n"
> 
> then save the buffer and visit the file again.  Now these problems
> should go away.
> 
> 



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

end of thread, other threads:[~2020-01-19  0:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-16  7:49 Accents with po-mode MENGUAL Jean-Philippe
2020-01-16  9:57 ` Robert Pluim
2020-01-18  0:09   ` MENGUAL Jean-Philippe
2020-01-18  8:11     ` Eli Zaretskii
2020-01-18  9:09       ` MENGUAL Jean-Philippe
2020-01-18  9:38         ` Eli Zaretskii
2020-01-18 10:29           ` MENGUAL Jean-Philippe
2020-01-18 11:20             ` Eli Zaretskii
2020-01-18 12:15               ` MENGUAL Jean-Philippe
2020-01-18 12:42                 ` Eli Zaretskii
2020-01-18 15:18                   ` MENGUAL Jean-Philippe
2020-01-18 15:33                     ` Eli Zaretskii
2020-01-18 15:43                       ` Eli Zaretskii
2020-01-19  0:45                         ` MENGUAL Jean-Philippe

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.