[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-users
Subject:    [ jEdit-users ] Explicit encoding in the file or autodetection. Why
From:       "Petr Prikryl" <PrikrylP () skil ! cz>
Date:       2007-02-01 7:07:26
Message-ID: E8AE1CAFC84D634A9CCC887B8AAB15EC1F1DA8 () skil01 ! skil ! mistni
[Download RAW message or body]

Hi Slava,

Petr Prikryl wrote:
> > :encoding=windows-1250:

Slava Pestov 
> I wonder where people get the idea that this works. 
> 'encoding' is not  a buffer-local property and it cannot 
> be set in this way, and the  documentation does not
> mention it.

Firstly the explanation (then the question)...

I am not going to say that "jEdit is wrong and why
you do not want to repare it as I want JUST NOW,
BECAUSE I WANT!" or the similar that I could read
here in the past ;-)

I like jEdit very much and use it every day. I am used
to that some features are not in documentation -- I mean
generally, not for jEdit.

You know perfectly the internals of jEdit, I do not. I am 
a programmer, but I know nothing about jEdit internals.
I want to use it only. I am a user. As a programmer I can
imagine how it could work. As a user, I cannot know
that 'encoding' is not a buffer-local property. What
I know as a user is that I can set different encoding
for different buffers. In .jedit/properties I can find

buffer.encoding=windows-1250

and the Buffer Option dialog looks like this
http://www.skil.cz/test/BufferOptions.png
(see the Loading and Saving section).

There is also 

buffer.folding=indent

inside my .jedit/properties and Folding mode:
combo box in Editing section of the dialog.
And the help for folding says that 
  "In the current buffer for future editing sessions 
   by placing the following in the first or last 10 lines 
   of a buffer, where mode is either "indent", "explicit", 
   or the name of a plugin folding mode:
      :folding=mode:
  " (end of citation)

>From the similarity I have just guessed that it could 
work also with :encoding=xxx: and it almost works 
(i.e. after Reload when opened via Ctrl+O or when 
the file is passed as argument to jEdit). From that 
I guessed that it could be a bug.

Now the question
=============

Could the explicit :encoding=xxxx: be implemented?
For me, the feature really makes sense.

I have also asked if a different approach could be
implemented -- plugin that could detect and set
the encoding from other properties of the file in
thread

[ jEdit-users ] Encoding autodetection for ... Python?

This way, also the :encoding=xxxx: could be implemented.
But also the HTML files may define encoding. For XML
files probably XML plugin does the detection. In my opinion,
it would be nice to have some generic detection mechanism
that could take prescriptions for how to detect the encoding
based on the mode -- similar to syntax highlighting based
on mode, for example.

Thanks for your time and experience,
  pepr

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-- 
-----------------------------------------------
jEdit Users' List
jEdit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic