#19 encoding problem

closed
None
5
2007-12-15
2006-08-10
hcssf
No

i using geany for editing c programms. But im have
problem with encoding support koi8r. Geany open files
always in iso-8859-1.
If i create file in koi8-r it view good but after save
and reopen iso-8859-1 again.

Discussion

  • Enrico Tröger
    Enrico Tröger
    2006-08-15

    • assigned_to: nobody --> eht16
     
  • Enrico Tröger
    Enrico Tröger
    2006-08-15

    Logged In: YES
    user_id=1117045

    Can you test Anjuta and/or GEdit? Is there the same problem
    or is it working with these programs?

     
  • Enrico Tröger
    Enrico Tröger
    2006-09-05

    Logged In: YES
    user_id=1117045

    This isn't really a bug, rather a wrong behaviour. The thing
    is, Geany probes all known encodings with the loading file
    and the first encoding which doesn't produce errors at
    converting will be used. This isn't very smart and not very
    efficient but ir works at the moment. Gedit and Anjuta do it
    mainly in the same way. The problem is, there is not really
    a good way to detect an encoding, so trying is the best one
    at the moment.
    Try to add a koi8-r specific character in one of your files
    and Geany should open it the next time with this encoding(I
    know, this isn't a solution).

     
  • Logged In: NO

    How about changing encoding when file is already open? For example, i want to open some HMTL file. It will be opened in KOI8-R character encoding. But i need to use windows-1251. So I try try Document -> Set Encoding -> East European -> Cyrillic 1251 (or smthg like this it is in Russian :)) and... nothing happens! Why Geany cant convert my file?

    PS Sorry for my English mates :)

     
  • Nick Treleaven
    Nick Treleaven
    2007-04-27

    Logged In: YES
    user_id=1268692
    Originator: NO

    > How about changing encoding when file is already open?

    Try File->Reload As. Or set the encoding in the Open dialog.
    The Document menu encoding item is for setting the encoding to *save* the document in.

     
  • Logged In: NO

    Hi there!

    I think it will be usefull Geany to autodetect encoding when it opens file.
    Many programms can do it.

     
  • Enrico Tröger
    Enrico Tröger
    2007-09-19

    Logged In: YES
    user_id=1117045
    Originator: NO

    > I think it will be usefull Geany to autodetect encoding when it opens file.
    Geany does this too. But sometimes the encoding can't be detected correctly(like in the case of the reporter). See my second reponse in this topic for details.

     
  • frlan
    frlan
    2007-12-15

    Logged In: YES
    user_id=1756313
    Originator: NO

    Since there is no suitable solution to check encoding of a text-file 100% correct, I will close this bug report. Reopen it if needed.

     
  • frlan
    frlan
    2007-12-15

    • status: open --> closed