Bug 459155 - gpk-application eats apostrophe characters, from summary/description
gpk-application eats apostrophe characters, from summary/description
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: gnome-packagekit (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Robin Norwood
Fedora Extras Quality Assurance
: Reopened
: 467134 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-14 15:01 EDT by James Antill
Modified: 2009-01-14 08:47 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-14 08:47:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Antill 2008-08-14 15:01:50 EDT
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 04:45:57 EDT
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 04:45:21 EDT
I'll build when koji isn't down.... :-(
Comment 3 James Antill 2008-10-06 11:48:46 EDT
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 11:50:02 EDT
Versiuon is: 

gnome-packagekit.x86_64                  0.3.5-1.fc10                  installed
Comment 5 Richard Hughes 2008-10-14 05:29:14 EDT
"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 10:07:37 EDT
 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 12:09:58 EDT
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 09:24:51 EDT
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 03:53:49 EDT
*** Bug 467134 has been marked as a duplicate of this bug. ***
Comment 10 Richard Hughes 2008-11-06 05:53:46 EST
(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 06:03:28 EST
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 06:12:09 EST
(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 11:09:00 EST
> 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 12:13:02 EST
>> 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 13:21:35 EST
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 08:47:41 EST
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.