unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* how do i reset text coding?
@ 2023-03-15  5:43 jindam, vani
  2023-03-15 12:45 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: jindam, vani @ 2023-03-15  5:43 UTC (permalink / raw)
  To: help-gnu-emacs

i am on debian testing. i have text "ಉಲ್ಲೇಖಗಳು" [kannada language 
alphabets] on both files: file1 & file2. for some reason it is showing 
text as series of numbers on file1 only. i have copied text from  file1 
and created another file [file3]. even file3 is showing same issue. if i 
hover over "U" [buffer coding system (multi-byte)] on all files [file1, 
file2, file3], it shows: utf-8-unix. i did ask on irc,  but i am lost. 
is there anyway to fix it without using commands? why this is not 
happening on file2?

regards,
jindam, vani

-- 
toots: @jindam_vani@mastodon.world



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

* Re: how do i reset text coding?
  2023-03-15  5:43 jindam, vani
@ 2023-03-15 12:45 ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-03-15 12:45 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 15 Mar 2023 11:13:59 +0530
> From: "jindam, vani" <jindam.vani@disroot.org>
> 
> i am on debian testing. i have text "ಉಲ್ಲೇಖಗಳು" [kannada language 
> alphabets] on both files: file1 & file2. for some reason it is showing 
> text as series of numbers on file1 only. i have copied text from  file1 
> and created another file [file3]. even file3 is showing same issue. if i 
> hover over "U" [buffer coding system (multi-byte)] on all files [file1, 
> file2, file3], it shows: utf-8-unix. i did ask on irc,  but i am lost. 
> is there anyway to fix it without using commands? why this is not 
> happening on file2?

You didn't tell enough to answer those questions.

  . is this a text-mode (a.k.a. "TTY") frame or a GUI frame?
  . what kind of "numbers" do you see? please show examples
  . what else is in file1 and file2 besides the Kannada text? what are
    the differences between file1 and file2?
  . what happens if you create a file with _only_ the Kannada text?
  . what is the major mode Emacs uses for each of the files?



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

* Re: how do i reset text coding?
@ 2023-03-15 15:21 jimdam, vani
  2023-03-15 16:30 ` Yuri Khan
  0 siblings, 1 reply; 9+ messages in thread
From: jimdam, vani @ 2023-03-15 15:21 UTC (permalink / raw)
  To: help-gnu-emacs

. is this a text-mode (a.k.a. "TTY") frame or a GUI frame?
gui frame
  . what kind of "numbers" do you see? please show examples
file1 screen shot https://ibb.co/kBnGx7P
file2 screen shot https://ibb.co/HPxPrZH
  . what else is in file1 and file2 besides the Kannada text? what are
    the differences between file1 and file2?
file1 https://bpa.st/raw/5LLTY
file2 https://bpa.st/raw/ZOPXK
  . what happens if you create a file with _only_ the Kannada text?
file3 kannada text only opens fine https://ibb.co/fVRBVD3
  . what is the major mode Emacs uses for each of the files?
C-hv shows:
 major-mode is a variable defined in ‘C source code’.

Its value is ‘text-mode’
Original value was ‘fundamental-mode’
Local in buffer wiki.txt; global value is fundamental-mode

Symbol for current buffer’s major mode.
The default value (normally ‘fundamental-mode’) affects new buffers.
A value of nil means to use the current buffer’s major mode, provided
it is not marked as "special".

  Automatically becomes buffer-local when set.
  You can customize this variable.

important: clicking customize, operate on all settings in 
this buffer: revert - reset settings:: resolved the issue?



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

* Re: how do i reset text coding?
  2023-03-15 15:21 how do i reset text coding? jimdam, vani
@ 2023-03-15 16:30 ` Yuri Khan
  2023-03-15 16:51   ` Eli Zaretskii
  2023-03-16 18:55   ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 9+ messages in thread
From: Yuri Khan @ 2023-03-15 16:30 UTC (permalink / raw)
  To: jimdam, vani; +Cc: help-gnu-emacs

On Wed, 15 Mar 2023 at 22:22, jimdam, vani <jindam.vani@disroot.org> wrote:
>   . what kind of "numbers" do you see? please show examples
> file1 screen shot https://ibb.co/kBnGx7P
> file2 screen shot https://ibb.co/HPxPrZH

On your first screenshot, the mode line shows ‘=’ instead of a ‘U’.
(info "(emacs) Mode Line") explains:

    ‘=’ means no conversion
    whatsoever, and is usually used for files containing non-textual data.

so that’s your issue: somehow, for that buffer, encoding is not set
correctly. (I don’t know why and where to look, so I will leave it to
others to help you diagnose it.)



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

* Re: how do i reset text coding?
  2023-03-15 16:30 ` Yuri Khan
@ 2023-03-15 16:51   ` Eli Zaretskii
  2023-03-16 18:55   ` Stefan Monnier via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-03-15 16:51 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Wed, 15 Mar 2023 23:30:12 +0700
> Cc: help-gnu-emacs@gnu.org
> 
> On Wed, 15 Mar 2023 at 22:22, jimdam, vani <jindam.vani@disroot.org> wrote:
> >   . what kind of "numbers" do you see? please show examples
> > file1 screen shot https://ibb.co/kBnGx7P
> > file2 screen shot https://ibb.co/HPxPrZH
> 
> On your first screenshot, the mode line shows ‘=’ instead of a ‘U’.
> (info "(emacs) Mode Line") explains:
> 
>     ‘=’ means no conversion
>     whatsoever, and is usually used for files containing non-textual data.
> 
> so that’s your issue: somehow, for that buffer, encoding is not set
> correctly.

Yes, exactly.

> (I don’t know why and where to look, so I will leave it to others to
> help you diagnose it.)

The screenshots don't show the entire text, and the text itself wasn't
posted here _as_text_, so it's hard to say.  But in any case, you can
do

  C-x RET r utf-8 RET

and Emacs will revisit the file with UTF-8 encoding.



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

* Re: how do i reset text coding?
@ 2023-03-15 18:29 jimdam, vani
  2023-03-16  5:24 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: jimdam, vani @ 2023-03-15 18:29 UTC (permalink / raw)
  To: help-gnu-emacs

> and the text itself wasn't
> posted here _as_text_

correct both screen shots and text files expire in a week.
file1 text:
https://lists.gnu.org/archive/html/help-gnu-emacs/

రుద్రుడు

== ಉಲ್ಲೇಖಗಳು ==
{{Reflist}}

3-5, 7,8, 14,15, 19, 23-25, 28-30, 32, 34-37, 39, 43-49
51, 53-63, 66-69, 74, 77-80, 83,84, 86,87, 89-99
101,103-105, 109-111, 113
1,2, 9,11, 16-18, 20, 22, 26,27, 38, 50,52, 64,65, 88

https://meta.m.wikimedia.org/wiki/Special:CentralAuth/%E0%B0%B0%E0%B1%81%E0%B0%A6%E0%B1%8D%E0%B0%B0%E0%B1%81%E0%B0%A1%E0%B1%81


file2 text:
ಉಲ್ಲೇಖಗಳು

ur, hi, bn, mr, pnb, pa, ne, gu, bpy, sl, or, sd, mai, ps, sa, hif, as,
bh, gom, dty, dv, pi, awa, rmy, ks, skr, ta, ml, te, kn, tcy, sat, mni

== তথ্যসূত্র ==
{{সূত্র তালিকা}}

== మూలాలు ==
{{Reflist}}

== ಉಲ್ಲೇಖಗಳು ==
{{Reflist}}


https://www.wikidata.org/wiki/Special:ItemByTitle/bnwiki/

{{font color|   |   }}

regards,
jindam, vani



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

* Re: how do i reset text coding?
  2023-03-15 18:29 jimdam, vani
@ 2023-03-16  5:24 ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-03-16  5:24 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 15 Mar 2023 18:29:39 +0000
> From: "jimdam, vani" <jindam.vani@disroot.org>
> 
> > and the text itself wasn't
> > posted here _as_text_
> 
> correct both screen shots and text files expire in a week.
> file1 text:

Thanks.  I've downloaded the two files, and "emacs -Q" on my system
has no problems displaying both correctly.

Did you try visiting these files in "emacs -Q"?  Does the problem
still exist with "emacs -Q"?  If the problem exists with "emacs -Q" as
well, then what does Emacs show if you type "C-h C" (note: capital C)?



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

* Re: how do i reset text coding?
  2023-03-15 16:30 ` Yuri Khan
  2023-03-15 16:51   ` Eli Zaretskii
@ 2023-03-16 18:55   ` Stefan Monnier via Users list for the GNU Emacs text editor
  2023-03-16 20:09     ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2023-03-16 18:55 UTC (permalink / raw)
  To: help-gnu-emacs

> On your first screenshot, the mode line shows ‘=’ instead of a ‘U’.
> (info "(emacs) Mode Line") explains:
>
>     ‘=’ means no conversion
>     whatsoever, and is usually used for files containing non-textual data.
>
> so that’s your issue: somehow, for that buffer, encoding is not set
> correctly. (I don’t know why and where to look, so I will leave it to
> others to help you diagnose it.)

My guess is that there's a NUL byte in the file.

I use (setq inhibit-null-byte-detection t) in my ~/.emacs because I've
been bitten by those NUL bytes too many times.


        Stefan




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

* Re: how do i reset text coding?
  2023-03-16 18:55   ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2023-03-16 20:09     ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-03-16 20:09 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Thu, 16 Mar 2023 14:55:12 -0400
> From:  Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> 
> My guess is that there's a NUL byte in the file.

In the files whose URLs were posted there're no null bytes.



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

end of thread, other threads:[~2023-03-16 20:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 15:21 how do i reset text coding? jimdam, vani
2023-03-15 16:30 ` Yuri Khan
2023-03-15 16:51   ` Eli Zaretskii
2023-03-16 18:55   ` Stefan Monnier via Users list for the GNU Emacs text editor
2023-03-16 20:09     ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2023-03-15 18:29 jimdam, vani
2023-03-16  5:24 ` Eli Zaretskii
2023-03-15  5:43 jindam, vani
2023-03-15 12:45 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).