[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [otaylor@redhat.com: .desktop files and encodings]
From:       Waldo Bastian <bastian () kde ! org>
Date:       2001-02-28 20:52:21
[Download RAW message or body]

On Wednesday 28 February 2001 12:16, David Faure wrote:
> Which is where this solution gets even uglier, and makes it even more
> difficult to support it in KDE, since KConfig parses the whole file in one
> go, using the same encoding on the stream all the way.

No, not any more. I changed that a few months ago.

> > > Another missing bit in KDE would be to recognize
> > > Name[de_DE] and prefer it over Name[de].
> >
> > That's in there - both expressed formally and with an example: [...]
>
> I know. I said that KDE didn't support it at the moment.
> All encoding considerations aside, KDE wouldn't do anything from a
> Name[de_DE] entry, AFAIK. But I expect input from Stephan Kulow about this
> (whether it's already supported, and whether we should add support for it).
>
> To conclude, I think that we can add Encoding=UTF-8 in KDE to help
> with encoding-determination, but this whole encoding mess might not be
> a good idea for the SPEC, especially since we all know that the future
> is UTF-8.

KDE only cares about the locale entry for the current language. E.g. if the 
file contains
Name[fr]=.... // Name[de]=.... and the language is 'de' it will not even try 
to decode the line with 'Name[fr]'.

I guess that would need some expansion to cover the de_DE case as well.

We currently have a patch in from bero that autodetects whether this entry is 
utf8. If it is not utf8 we assume it is in encoding of the locale. (local 8 
bit) I guess using the locale isn't really reliable though.

With this proposal we could limit the utf8 check to those strings that are 
marked "localestrings" and don't do the check at all if the desktop entry has 
a 'Encoding=UTF-8' line.

Anyway, I wouldn't put in a standard anything else than utf8 because in the 
end that's really the desired encoding IMO. 

I'm not sure how well autodetection for utf8 works, but if it works reliable 
I don't see a need for an encoding header either, we can't rely on an 
encoding key being present anyway so we would need this autodetection anyway.
Autodetection is hardly more work than scanning for an "Encoding" header.

Cheers,
Waldo
-- 
bastian@kde.org | SuSE Labs KDE Developer | bastian@suse.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic