Simple, Slim and Sleek Text Editor for GNOME

RFE: specify the encoding of a file via a command line option

Reported by Th3Pr0ph3t on 2011-02-16
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scribes
Wishlist
Mystilleef

Bug Description

I use the iso-8859-1 encoding all the time. However, when I use scribus, it can detect ISO-8859-1 as the file's encoding but as soon as I save the file is converted to UTF-8 which is a serious problem for web pages.

I hope this gets fixed when the --encoding / -e commandline option is implemented (which is not implemented yet).

I am using scribus version: 0.4-dev-build849

I expect scribus to either save the file in the encoding of the original file or have a preferred encoding that it will use for all files.

Mystilleef (mystilleef) wrote :

I'll have a look at it shortly.

Mystilleef (mystilleef) on 2011-02-23
Changed in scribes:
importance: Undecided → Medium
Mystilleef (mystilleef) wrote :

If a file opens correctly with utf8, Scribes just uses it.
uft8 is a universal encoding. If a file fails to open in
utf8 then Scribes guesses the encoding. However, guessing is
unreliable.

You can force Scribes to use a specific encoding by pressing
ctrl+shift+s and changing the encoding information in the
encoding box. That should work.

Otherwise there's no sane way to guess encoding. Gedit
guessed "menu.txt" as iso8859-15. Another application
guessed the same file as iso8859-2. Scribes guessed it as
utf8. And you expected the file to be iso8859-1.

If everyone just standardized on utf8, the world would be a
perfect place. :-)

summary: - Does not save in the original file encoding
+ RFE: specify the encoding of a file via a command line option
Changed in scribes:
status: New → Triaged
importance: Medium → Wishlist
assignee: nobody → Mystilleef (mystilleef)
Th3Pr0ph3t (th3pr0ph3t) wrote :

This bug is almost fixed, all it needs is a small variable where to store the user-selected encoding.
However, if I use the -e option, it does work as expected!

So:
1)
scribes menu.txt
-- guesses utf-8 but shows a dialog where if the user, chooses iso-8859-1, it opens as iso-8859-1 but saves as utf-8.
2)
scribes -e iso-8859-1 menu.txt
-- works as expected: opens as iso-8859-1 and saves as iso-8859-1: this switch was not implemented when I reported this bug.

So, I think this is about 2 lines of code from working nice in case 1).

Th3Pr0ph3t (th3pr0ph3t) wrote :

WRONG:
I'm sorry I cannot delete the previous post.
It seems I got confused with the file saved manually during my tests.
The only way to get this working is using save as (ctrl-shift-s) and selecting the encoding manually.

Mystilleef (mystilleef) wrote :

Yes, -e has not yet been implemented.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions