Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #549 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH] utf8 doesn't work in SOForeignKey's in CatWalk

Reported by: bjourne@… Owned by: anonymous
Priority: normal Milestone:
Component: Toolbox Version:
Severity: major Keywords:
Cc:

Description

This is a strange problem. CatWalk seem to handle utf8 perfectly until you try to have a column containing utf8 characters as the label column of a SOForeignKey.

How to repeat:

  1. Download the TurboTunes? example  http://www.turbogears.org/docs/TurboTunes/
  1. Type tg-admin toolbox and go to catwalk.
  1. Add an album named "Ebba Grön" (without quotes)
  1. Add a song with name "Uppgång & Fall" and album #1 which should be the album you added in step 3.
  1. Click the Song table's structure tab and change SOForeignKey:Album's label column from id to name.
  1. Click the browse tab of the Song table.

If your browser, database and kid uses utf8 then the album field will have all non-ascii characters garbled. On my setup the fields look like:

ID: 1 album: Ebba Grön name: Uppgång & Fall

The "ö" in "Ebba Grön" is garbled, but the "å" in "Uppgång & Fall" is displayed correctly.

Attachments

tg-fix-catwalk-utf8-probs.patch Download (3.2 KB) - added by bjourne@… 13 years ago.
My attempt to solve my utf8 problems in CatWalk

Change History

Changed 13 years ago by bjourne@…

My attempt to solve my utf8 problems in CatWalk

comment:1 Changed 13 years ago by bjourne@…

The attached patch is supposed to solve the utf8 problems in SOForeignKeys. I think the reason for the problems is that CatWalk do not convert foreign keys label columns to unicode. But it seems to do that with the other columns so I think it should do that to foreign keys too. And there are some very slight cleanup in the patch too. Like a spelling correction.

comment:2 Changed 13 years ago by splee

  • Summary changed from utf8 doesn't work in SOForeignKey's in CatWalk to [PATCH] utf8 doesn't work in SOForeignKey's in CatWalk

comment:3 Changed 13 years ago by ronald@…

  • Status changed from new to closed
  • Resolution set to fixed

Thanks for the patch Bjørn! I modify it a bit though. rev740

Note: See TracTickets for help on using tickets.