Summary: | kdebase 3.2.3-r1: kwrite ignores utf8 encoding when opening files | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | gna <gnagent2> |
Component: | [OLD] KDE | Assignee: | Gentoo KDE team <kde> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | utf8 |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | test file that illustrates the problem |
Description
gna
2004-08-30 05:00:48 UTC
Created attachment 38494 [details]
test file that illustrates the problem
Probably some characters will display with boxes if you don't have chinese
fonts on your system, but some should display. The problem shows up as latin 1
characters with codepoints >= 128 rather than boxes due to missing glyphs
Just discovered that kwrite as an option to set the encoding in the view menu. When I openned kwrite the encoding was set to auto. If I manually set the encoding to utf8 the Chinese displays correctly. If I set it back to auto the problem comes back. If I set the encoding to Western European iso 8859-1 then it looks the same as when set to auto. Thus it seems to be that the auto encoding should get the encoding from the locale but it is instead assuming an 8859-1 encoding (or possibly 8859-15). "auto" means the global encoding specified in .kde/share/config/kwriterc (opposed to the file-specific one that can be set by the drop-down menu). If you don't have an Enconding parameter in kwriterc, then your locale is taken into account, but from that time on, the value stored in kwriterc takes precedence over locale, and should be changed in Settings -> Configure Editor -> Open/Save -> Encoding ok I see the option. Changing it to utf8 means the file opens correctly as you say. I didn't set this option. It must have been set by the kde setup wizard when it asked me what country I was from. Personally I think it is quite a bad design. I guess the setup wizard is assuming you want the default encoding that is associated with your language. Generally a system should use one encoding as there is no file metadata that tells someone what encoding a file is using and it is not possible to determine it just from looking at the file unless you have other information as well. Thus I think the auto should refer to a system setting rather than an application specific setting. Imagine the pain of changing your locale if every application did this. I am not sure what should be changed to make kde more utf8 friendly. It's not set by the setup wizard, if yiu did not set it before it gets its value from the locale variables. I agree there can be a bit of ambiguity in the configuration arrangement, but I don't have anything to propose. At this point you can close this bug, and if an idea comes to your mind, you should make yourself heard in http://bugs.kde.org/ I don't have any brilliant ideas. |