How to use ISO-8859-11 character encoding with gedit

Asked by San Rai on 2011-07-14

Hello I want to Open & Edit text file with ISO-8859-11 character encoding
(It can't open as 'TIS-620' encoding because of nbsp character)

but I don't know how.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gedit Edit question
Assignee:
No assignee Edit question
Last query:
2011-07-14
Last reply:
2011-07-14
Sam_ (and-sam) said : #1

When this menu is opened
file -> save as

should an option 'character encoding' be displayed in order to change and save the file with it.

San Rai (sarun101) said : #2

but It has no 'ISO-8859-11' Encoding

San Rai (sarun101) said : #3

I am not good in English
but I mean

I want to open a file that use ISO-8859-11 as character encoding
the "ISO-8859-11" has sightly different from "TIS-620" encoding

unfortunately The file I want to open has a "non-breaking space" character which
defined in "ISO-8859-11" encoding but not define in "TIS-620" Encoding.

Sam_ (and-sam) said : #4

Find out in a terminal if the encoding is available.
locale -a

If yes it can be added to gedit.desktop file.
https://help.ubuntu.com/community/EnvironmentVariables#Launching%20desktop%20application%20with%20an%20environment%20variable

San Rai (sarun101) said : #5

I found this encoding in
$ locale -m

but I still has no idea what to do next(I'm new in Linux)

I searched for "gedit.desktop" but still not found
then I try to create new file with that name but still have no idea how to use this
or what should I put into this file
I'm just guessing
"Exec=env LC_CTYPE=ISO-8859-11 gedit"
or something?

Could you give me more info about this?

San Rai (sarun101) said : #6

Update:
I just found gedit.desktop

I replace:
Exec=gedit %U
with:
Exec=env LC_CTYPE=ISO-8859-11 gedit %U

but gedit still can't display my file with specific encoding

any solution?

Sam_ (and-sam) said : #7

If locale -a doesn't display ISO-8859-11 there're maybe be Thai packages missing.
https://help.ubuntu.com/community/EnvironmentVariables#Locale%20setting%20variables
https://secure.wikimedia.org/wikipedia/en/wiki/ISO/IEC_8859-11

When you open the save as ... dialog, did you try the encoding drop down list add-remove and scrolled if it's listed there?

Example .desktop file
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-0.9.4.html#example

San Rai (sarun101) said : #8

Hello, Thank you for the answer
but this is too complicate for me

Now I just switch to jEdit instead

Can you help with this problem?

Provide an answer of your own, or ask San Rai for more information if necessary.

To post a message you must log in.