Public bug reported:
UTF16 document saved with automatic encoding detection is saved as UTF8
instead of UTF16.
Example given:
--------------
- There is an "UTF16_sample.txt" document included in this bug. It's an UTF16
encoded file:
$ file UTF16_sample.txt
UTF16_sample.txt: Unicode text, UTF-16, little-endian text, with CRLF
line terminators
- Open it with with gnome-text-editor. It is correctly interpreted and it's
content are shown as:
aeiouáéíóú
AEIOUÁÉÍÓÚ
- Don't modify it's content, just save the document. It uses automatic encoding
detection but it saves the document as UTF8 instead of UTF16:
$ file UTF16_sample.txt
UTF16_sample.txt: Unicode text, UTF-8 text, with CRLF line terminators
In my opinion this is a bug because the encoding should be the same of
the original file when saving with automatic encoding detection. But, if
it's not being considered a bug, I think that at least there should be a
warning when saving is going to replace a document with a different
encoding using automatic encoding detection.
Note: if UTF16 encoding is manually selected in "Save As" dialog the
resulting file encoding is correct so the problem should be the
autodetection that worked for reading the document but fails when
saving.
Additional Info:
----------------
$ lsb_release -rd:
Description: Ubuntu 24.10
Release: 24.10
$ apt-cache policy gnome-text-editor
gnome-text-editor:
Instalados: 47.0-1ubuntu2
Candidato: 47.0-1ubuntu2
Tabla de versión:
*** 47.0-1ubuntu2 500
500 http://ports.ubuntu.com/ubuntu-ports oracular/main arm64 Packages
100 /var/lib/dpkg/status
** Affects: gnome-text-editor (Ubuntu)
Importance: Undecided
Status: New
** Tags: automatic detection encoding utf16 utf8
** Attachment added: "UTF16_sample.txt"
https://bugs.launchpad.net/bugs/2088446/+attachment/5838125/+files/UTF16_sample.txt
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-text-editor in Ubuntu.
https://bugs.launchpad.net/bugs/2088446
Title:
UTF16 document saved with automatic encoding detection is saved as
UTF8 instead of UTF16
Status in gnome-text-editor package in Ubuntu:
New
Bug description:
UTF16 document saved with automatic encoding detection is saved as
UTF8 instead of UTF16.
Example given:
--------------
- There is an "UTF16_sample.txt" document included in this bug. It's an UTF16
encoded file:
$ file UTF16_sample.txt
UTF16_sample.txt: Unicode text, UTF-16, little-endian text, with CRLF
line terminators
- Open it with with gnome-text-editor. It is correctly interpreted and it's
content are shown as:
aeiouáéíóú
AEIOUÁÉÍÓÚ
- Don't modify it's content, just save the document. It uses automatic
encoding detection but it saves the document as UTF8 instead of UTF16:
$ file UTF16_sample.txt
UTF16_sample.txt: Unicode text, UTF-8 text, with CRLF line terminators
In my opinion this is a bug because the encoding should be the same of
the original file when saving with automatic encoding detection. But,
if it's not being considered a bug, I think that at least there should
be a warning when saving is going to replace a document with a
different encoding using automatic encoding detection.
Note: if UTF16 encoding is manually selected in "Save As" dialog the
resulting file encoding is correct so the problem should be the
autodetection that worked for reading the document but fails when
saving.
Additional Info:
----------------
$ lsb_release -rd:
Description: Ubuntu 24.10
Release: 24.10
$ apt-cache policy gnome-text-editor
gnome-text-editor:
Instalados: 47.0-1ubuntu2
Candidato: 47.0-1ubuntu2
Tabla de versión:
*** 47.0-1ubuntu2 500
500 http://ports.ubuntu.com/ubuntu-ports oracular/main arm64 Packages
100 /var/lib/dpkg/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-text-editor/+bug/2088446/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp