[gedit-list] how does gedit detect the encoding of a text file?



Hello,

gedit can always find the correct encoding when opening a text file, while chardet can often fail to and 
emacs sometimes too.
   
1. How does gedit detect the encoding of a text file?                                                         
                                                           
Does gedit save some encoding information as metadata to the text files during their creation?                
                                                                                                              
                            
                                                                                                              
                         
2. can I run gedit in terminal to detect encoding of a text file, just like chardet does in terminal?  So 
that I can use gedit in my shell script for detecting encodings?                                          
  
Thanks!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]