Setting encoding in Kate

Kevin Krammer krammer at kde.org
Wed Sep 6 15:19:03 BST 2017


On Wednesday, 2017-09-06, 17:04:27, Nikos Chantziaras wrote:
> On 06/09/17 16:17, Burkhard Lück wrote:
> > Am Montag, 4. September 2017, 22:46:44 CEST schrieb Nikos Chantziaras:
> >> Is there a way to mark a file as using a specific encoding? Like some
> >> string inside a C comment that Kate recognizes?
> > 
> > https://docs.kde.org/trunk5/en/applications/katepart/config-variables.html
> 
> Alright. So, putting:
> 
>    kate: encoding cp-1252
> 
> in .kateconfig works, whereas an in-file modeline doesn't.

In-file only works for saving, as the information is then available when 
needed, but doesn't work for loading as that is too late.

> However, I can't use a .kateconfig for this, since now *all* files in
> the directory are opened with cp-1252 as the encoding, not just the ones
> that actually are.

I would personally recommend recoding to UTF-8 on princple, this is the 21st 
century, platform specific encodings ought to be a thing of the past.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde/attachments/20170906/e932edd6/attachment.sig>


More information about the kde mailing list