Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
36
rated 0 times [  36] [ 0]  / answers: 1 / hits: 74746  / 2 Years ago, sun, february 27, 2022, 8:29:05

I can not display file coded with GBK.
In gconf-editor of gnome 3.2 , I can not find encoding item of gedit .
How to set it ?
thanks


More From » gedit

 Answers
2

I don't have a file encoded in GBK to test the solutions, but do try them.



Option 1: Run gedit and then open the file:




  • run gedit


  • click open


  • select in the encoding combo "add" and add GB18030 (or GBK)


  • select that encoding in the combo


  • select the file




Option 2:




  • install and run gconf-editor


  • Find /apps/gedit-2/preferences/encoding key "auto_detected" and set it to:



    [CURRENT,GB18030,GBK,GB2312,UTF-8,UTF-16]



Remember to backup the previous value of auto_detected!!



Option 3:
Using dconf (the "newer" gconf, used in ubuntu)



dconf read /org/gnome/gedit/preferences/encodings/auto-detected


Save the result (backup)!



dconf write /org/gnome/gedit/preferences/encodings/auto-detected "['CURRENT', 'GBK', 'GB18030', 'GB2312', 'UTF-8', 'UTF-16']"


Sources:





To reset it to default:
a) use the option you backed up from dconf read command



or b) try:



dconf reset /org/gnome/gedit/preferences/encodings/auto-detected

[#40788] Sunday, February 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ardtry

Total Points: 254
Total Questions: 99
Total Answers: 114

Location: Finland
Member since Fri, Oct 21, 2022
2 Years ago
;