Bug 459155 - gpk-application eats apostrophe characters, from summary/description
Summary: gpk-application eats apostrophe characters, from summary/description
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-packagekit
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robin Norwood
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 467134 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-14 19:01 UTC by James Antill
Modified: 2009-01-14 13:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-14 13:47:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Antill 2008-08-14 19:01:50 UTC
Description of problem:
 Open gpk-application, click "programming". Scroll down to "David s advanced revision control system"
 Also see description.

 Compare with "yum info darcs".

Version-Release number of selected component (if applicable):
gnome-packagekit.x86_64                  0.2.3-9.fc9            installed

Comment 1 Richard Hughes 2008-08-15 08:45:57 UTC
Fixed upstream in master and 0.2.x -- I've also added this as a fix to the F9 package; I'll build it this afternoon when I've added a couple more fixes to the build. Thanks for reporting dude.

Comment 2 Richard Hughes 2008-08-18 08:45:21 UTC
I'll build when koji isn't down.... :-(

Comment 3 James Antill 2008-10-06 15:48:46 UTC
I'm going to reuse this, as it's now a slightly different bug but basically the same problem. It now shows...

Darcs is intended to be an ``advanced'' revision control system

Comment 4 James Antill 2008-10-06 15:50:02 UTC
Versiuon is: 

gnome-packagekit.x86_64                  0.3.5-1.fc10                  installed

Comment 5 Richard Hughes 2008-10-14 09:29:14 UTC
"Darcs is intended to be an ``advanced'' revision control system." gets pushed through g_markup_escape_text, hence the oddity.

I've made this a bit more sane, and also made the quotes into proper UTF8 quotes, so now the output is "Darcs is intended to be an “advanced” revision control system"

I've fixed this in 57842660963281632327a20f744f22aca9b63cf5, many thanks.

Comment 6 James Antill 2008-10-14 14:07:37 UTC
 I've tried to look for that commit on the gnome-packagekit and PackageKit git repos, but I can't find it?

Comment 7 Richard Hughes 2008-10-14 16:09:58 UTC
Ahh, it's not synced to the anon repo yet. Do you want access to the developer repo? If so just send me a private mail with your RSA public key and your chosen username and I'll give you access.

Comment 8 James Antill 2008-10-15 13:24:51 UTC
Ok, I'm going to reopen this, because the workaround is: 

+       egg_strreplace_indirect (&text, "``", "“");
+       egg_strreplace_indirect (&text, "''", "”");
+       egg_strreplace_indirect (&text, "'", "’");

...this is bad IMO as IMNSHO PK shouldn't be altering the data unless it has to, if we want to change the above package descriptions we should just do that in Fedora.
 A good example of the problem here is python-peak-util-addons in Fedora, as it just uses ``. Likewise I'm sure there are some cases of packages using ' where they really don't want ’.

 So is it possible to fix this without changing the data?

Comment 9 Richard Hughes 2008-10-16 07:53:49 UTC
*** Bug 467134 has been marked as a duplicate of this bug. ***

Comment 10 Richard Hughes 2008-11-06 10:53:46 UTC
(In reply to comment #8)
> ...this is bad IMO as IMNSHO PK shouldn't be altering the data unless it has
> to, if we want to change the above package descriptions we should just do that
> in Fedora.

Is Fedora policy to allow UTF8 in the package description?

>  A good example of the problem here is python-peak-util-addons in Fedora, as it
> just uses ``. Likewise I'm sure there are some cases of packages using ' where
> they really don't want ’.

The only way I think this would work would be to write a mail to fedora-devel and ask maintainers to clean up the use of ”, ” and ’.

>  So is it possible to fix this without changing the data?

If the packages can be easily fixed, then sure. Otherwise I think it has to continue doing this replacement. Note, it also does replacement this like this when the changelog contains "* " and a bullet is used instead. I can't see packagers using the bullet in changelogs anytime soon.

Richard.

Comment 11 Mathieu Bridon 2008-11-06 11:03:28 UTC
Well, one could think about asking maintainers to stop using those special chars. That would require a lot of work, but it can be done.

However, think about the translations. In a lot of languages, chars like "é" or "ä" are used, and, at least in French, there is a huge difference in meaning between "trompe" and "trompé".

I don't think it is a viable solution to simply prevent the use of those chars.

Comment 12 Richard Hughes 2008-11-06 11:12:09 UTC
(In reply to comment #11)
> I don't think it is a viable solution to simply prevent the use of those chars.

Ohh, I _want_ the package maintainers to use UTF8. It's the only sane way of doing things. The problem is a lot of people live in an ASCII world.

Comment 13 James Antill 2008-11-06 16:09:00 UTC
> Is Fedora policy to allow UTF8 in the package description?

 Yes, I believe this was mainly so that © and ® could be used ... but as   Mathieu says, this is also required handling for non-en data.

> The only way I think this would work would be to write a mail to fedora-devel
> and ask maintainers to clean up the use of ”, ” and ’.

 Seems reasonable to me.

> >  So is it possible to fix this without changing the data?

> If the packages can be easily fixed, then sure. Otherwise I think it has to
> continue doing this replacement.

What I meant was "is it possible to fix PK to show the data that is there now, without munging it"? While we can probably use rpmlint etc. to eradicate '"' and "'" bytes from Fedora pacakges, they are still going to have to be handled in random packages.


> Note, it also does replacement this like this
> when the changelog contains "* " and a bullet is used instead.

 In this context PK should be able to always do the right thing though, as that byte is part of the changelog syntax ... dito. date/name/ver and the - on the lines after it.
 The description munging is very different, as you are altering free text. As I pointed out it does the wrong thing for python-peak-util-addons etc.

Comment 14 Mathieu Bridon 2008-11-06 17:13:02 UTC
>> The only way I think this would work would be to write a mail to fedora-devel
>> and ask maintainers to clean up the use of ”, ” and ’.

> Seems reasonable to me.

As I said, those might not be the only chars in question. I suppose "é" will be replaced by "´" right ?

If that's the case, then PK should learn how to display them properly instead of asking people (packagers / translators) to write their own language in an incorrect way (i.e. without accents for non-english languages).

Comment 15 Christopher Beland 2008-12-24 18:21:35 UTC
FYI, I'm seeing ü OK with gnome-packagekit-0.4.0-2.fc11.x86_64, though I do get “advanced” instead of ``advanced''.

Comment 16 Richard Hughes 2009-01-14 13:47:41 UTC
See http://packagekit.org/pk-faq.html#markup


Note You need to log in before you can comment on or make changes to this bug.