Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94836 - KDE-i18n-3.4.1: Finnish translations have character encoding bug regarding symbol ä. Patch needed.
Summary: KDE-i18n-3.4.1: Finnish translations have character encoding bug regarding sy...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High critical (vote)
Assignee: Gentoo KDE team
URL: http://bugs.kde.org/show_bug.cgi?id=1...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-02 09:10 UTC by Antti Mäkelä
Modified: 2005-11-19 17:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
kde.rb (kde.rb,1.61 KB, text/plain)
2005-07-13 08:26 UTC, Petteri Räty (RETIRED)
Details
kde.rb (kde.rb,1.61 KB, text/plain)
2005-07-13 09:17 UTC, Petteri Räty (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Mäkelä 2005-06-02 09:10:47 UTC
In KDE 3.4.1, .desktop files at /usr/kde/3.4/share/applications/kde have a bug for their finnish section. Problem has been noted by the localization team, but unfortunately the fix cannot really be made upstream until 3.4.2 is out.

Can we construct a regexp that would fix the finnish .desktop files (and only them) during installation? And where can we place it?

Problem comes from the fact that symbol '
Comment 1 Antti Mäkelä 2005-06-02 09:10:47 UTC
In KDE 3.4.1, .desktop files at /usr/kde/3.4/share/applications/kde have a bug for their finnish section. Problem has been noted by the localization team, but unfortunately the fix cannot really be made upstream until 3.4.2 is out.

Can we construct a regexp that would fix the finnish .desktop files (and only them) during installation? And where can we place it?

Problem comes from the fact that symbol 'ä' is represented in UTF-8 with Ã. Because of corruption (upstream), this has been replaced with ï¿. So, a simple 

sed -e 's:ï¿:Ã:'

should be enough to fix the problem, but 
a) regexp should be fixed to only include lines including [fi]
b) Where to put this? kde-i18n package is wrong place because it only installs LC_MESSAGES-files, not .desktop files. So editing of kde-eclass might be required..

For me personally, running that sed helped, but I only need finnish and english.
Comment 2 Flammie Pirinen (RETIRED) gentoo-dev 2005-06-04 00:47:57 UTC
I don't use KDE, but something along the lines "s/(\[fi\].*)ᅵ/\1À/g" will at
least replace the first broken 
Comment 3 Flammie Pirinen (RETIRED) gentoo-dev 2005-06-04 00:47:57 UTC
I don't use KDE, but something along the lines "s/(\[fi\].*)ï¿/\1Ã/g" will at
least replace the first broken ä from each fi line, someone should be able to
construct a bit more correct solution from that quite easily but I don't have
time to think it more thoroughly now.

As for the placement I suggest eclass' postinst something like pseudocode:
if linguas_fi && kde version 3.4.1; then
ewarn "this KDE has broken encoding in Finnish desktop files, please execute"
ewarn "  sed "s/(\[fi\].*)ï¿/\1Ã/g" /blah/blah/*desktop to correct"
endif
Comment 4 Carsten Lohrke (RETIRED) gentoo-dev 2005-06-12 17:35:42 UTC
Sorry, we can only care for critical or security relevant bugs. If you come up
with a patch, we might apply it, otherwise KDE 3.4.2 is good enough.
Comment 5 Petteri Räty (RETIRED) gentoo-dev 2005-07-12 03:28:25 UTC
KDE 3.4.1 is now marked as stable but this bug makes it impossible for me to switch to  
3.4.1. I look after my grand parent's computer and it is impossible for them to use nothing  
else than Finnish as the language. I will try to come up with a patch for this.  
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2005-07-12 03:40:40 UTC
Upstream bug: 
http://bugs.kde.org/show_bug.cgi?id=106866 
Comment 7 Petteri Räty (RETIRED) gentoo-dev 2005-07-13 08:26:55 UTC
Created attachment 63315 [details]
kde.rb

This ruby script can be used to fix files installed on the system. It searches
for the string [fi] and then replaces all broken byte secuences with
Comment 8 Petteri Räty (RETIRED) gentoo-dev 2005-07-13 08:26:55 UTC
Created attachment 63315 [details]
kde.rb

This ruby script can be used to fix files installed on the system. It searches
for the string [fi] and then replaces all broken byte secuences with äs until a
new line is found. Without any arguments it searches /usr/kde/3.4 or it can be
given the files to inspect in the command line. You need to give it the
argument replace and it will replace the system files with fixed ones. This
script could be used on the tarballs to replace the b0rked files.
Comment 9 Gregorio Guidi (RETIRED) gentoo-dev 2005-07-13 08:54:13 UTC
This is a good solution for those who have this problem until kde 3.4.2 is 
out, but we won't make a new release of kde 3.4.1 and force everyone to 
recompile because of this issue, the people affected can just wait or fix it 
locally. 
 
Comment 10 Petteri Räty (RETIRED) gentoo-dev 2005-07-13 09:01:20 UTC
I agree that everyone should not be forced to recompile. I think there should be
something like 
if use linguas_fi; then
    einfo "Finnish translation is broken see"
    einfo "http://bugs.gentoo.org/show_bug.cgi?id=94836"
fi
This could be put to kde eclasses so it would make sure that users find this
solution. 
Comment 11 Petteri Räty (RETIRED) gentoo-dev 2005-07-13 09:03:24 UTC
BTW it is not only .desktop files. At least these types of files seem to be in
the list of broken files:

.deskop
rc-files
.directory
.protocol
Comment 12 Petteri Räty (RETIRED) gentoo-dev 2005-07-13 09:17:59 UTC
Created attachment 63326 [details]
kde.rb

There was ! missing from so the text was wrong:
	if ! $replaceOriginal
		puts 'Searching /usr/kde/3.4 for corrupted files'
	else
		puts 'Fixing non executable files in /usr/kde/3.4'
	end

Also please note that this script changes system files and can harm your kde
install. I have used this script to correct my own install succesfully, but
please be careful.
Comment 13 Antti Mäkelä 2005-07-19 09:52:20 UTC
According to
http://developer.kde.org/development-versions/kde-3.4-release-plan.html the
3.4.2 will be released on 27th of July, and knowing Gentoo, it's probably
available for installation the very next day. So if you can wait for like a bit
over a week there is little need for patching. 
Comment 14 Petteri Räty (RETIRED) gentoo-dev 2005-07-19 10:38:12 UTC
3.4.1 is stable so stabilization needs time too 
Comment 15 Eero Volotinen 2005-10-19 03:36:52 UTC
(In reply to comment #9)
> Created an attachment (id=63326) [edit]
> kde.rb
> 
> There was ! missing from so the text was wrong:
> 	if ! $replaceOriginal
> 		puts 'Searching /usr/kde/3.4 for corrupted files'
> 	else
> 		puts 'Fixing non executable files in /usr/kde/3.4'
> 	end
> 
> Also please note that this script changes system files and can harm your kde
> install. I have used this script to correct my own install succesfully, but
> please be careful.

Script that you created is not working correctly or instructions to use it is
not enought documented.

For example:

running this script does not fix problems. like ./kde.rb


--
Eero
Comment 16 Petteri Räty (RETIRED) gentoo-dev 2005-10-19 09:32:54 UTC
(In reply to comment #12)
> 
> running this script does not fix problems. like ./kde.rb
> 

1) Do you have ruby installed?
2) did you restart kde?
Comment 17 Eero Volotinen 2005-10-19 10:23:03 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > 
> > running this script does not fix problems. like ./kde.rb
> > 
> 
> 1) Do you have ruby installed?
> 2) did you restart kde?

Well, I restarted X using "control-alt-backspace".

--
Eero
Comment 18 Petteri Räty (RETIRED) gentoo-dev 2005-10-19 11:54:32 UTC
IMHO the best solution at this point is to move to using one of the later kde
releases. I will do some digging to find out what is the status of one of the
later releases going stable.
Comment 19 Eero Volotinen 2005-10-19 13:43:13 UTC
(In reply to comment #15)
> IMHO the best solution at this point is to move to using one of the later kde
> releases. I will do some digging to find out what is the status of one of the
> later releases going stable.

Yes, but they are masked as testing. This kind of should be fixed in ebuilds.

Usually I use stable as production environments.



--
Eero
Comment 20 Petteri Räty (RETIRED) gentoo-dev 2005-11-19 17:11:36 UTC
3.4.3 is heading towards stable. Watch bug 112842 for details.