Opened 18 years ago
Closed 18 years ago
#3539 closed defect (fixed)
Recording program to a recgroup containing ä/ö characters, corrupts the recording group name
Reported by: | otto at kolsi dot fi | Owned by: | stuartm |
---|---|---|---|
Priority: | blocker | Milestone: | 0.21 |
Component: | mythtv | Version: | head |
Severity: | low | Keywords: | recording group, UTF8 |
Cc: | Ticket locked: | no |
Description
If recording group name contains e.g. characters 'ä', or 'ö', when you schedule and record a program to this recording group the group name gets corrupted in DB (table 'recorded', column 'recgroup'.
End result is that if you scheduled a recording to 'Metsästys' group, when it is recorded, there is a group like 'MetsŤstys'. There's probably just one .toUtf8() / .fromUtf8() type of call missing somewhere where recording info is stored to DB.
Other than this, recgroups containing other than plain ASCII characters seem to work fine (in playback, in MythWeb etc.).
Attachments (2)
Change History (17)
Changed 18 years ago by
Attachment: | recgroup-utf8.patch added |
---|
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
Milestone: | unknown → 0.21 |
---|---|
Owner: | changed from Isaac Richards to stuartm |
Type: | defect → patch |
comment:3 follow-up: 4 Changed 18 years ago by
My concern is that we have obviously pulled the recgroup name from the database somewhere without converting it to unicode - which goes against what we do with every other text string. Although it might mean more changes, the correct way to handle the problem would be to find where we've missed .fromUTF8()
I'm wondering why we are passing around recgroup as a string anyway - using a numeric id is much safer and makes changing things like the recgroup name much easier. Perhaps we need to setup a recgroup table indexing the recgroups by an id, storing the name and password (replacing recgrouppassword).
comment:4 Changed 18 years ago by
Replying to stuartm:
My concern is that we have obviously pulled the recgroup name from the database somewhere without converting it to unicode - which goes against what we do with every other text string. Although it might mean more changes, the correct way to handle the problem would be to find where we've missed .fromUTF8()
I thought exactly the same, should have mentioned that in the ticket. I very briefly tried to find the place where we pull out the recgroup from the database and that seemed to have the correct .fromUTF8() call in place. But I could have (and obviously did) missed something.
If anyone else is having this problem, original patch can be used as a workaround but as you said, it's better to fix the initial cause of the problem.
comment:5 Changed 18 years ago by
Type: | patch → task |
---|
Changed 18 years ago by
Attachment: | recgroup_utf8.diff added |
---|
comment:6 Changed 18 years ago by
Otto could you try the patch I've attached? I don't have time right now to convert everywhere that uses recgroup to use a numeric id and even if I started, I'd then have to do the same for the playgroup, storagegroups and a dozen other things. So I've just made sure that we are converting recgroup to unicode when pulling it from the database.
comment:7 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:8 Changed 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → new |
This issue in fact has not been fixed, I somehow wrongly tested it earlier. Here is additional steps to reproduce this problem:
- take existing recording and assign it to a new recgroup named e.g. TEST-ü (containing any non-ascii character)
- verify that so far recgroup is shown correctly
- go and schedule recording and set it to record to this new test group
- when recording starts, go to Watch Recordings -> there's an additional recgroup with corrupted name: TEST-Ã1/4
comment:9 Changed 18 years ago by
Status: | new → accepted |
---|
comment:10 Changed 18 years ago by
Priority: | minor → blocker |
---|---|
Status: | accepted → started |
comment:11 Changed 18 years ago by
Type: | task → defect |
---|
comment:12 Changed 18 years ago by
comment:13 Changed 18 years ago by
comment:14 Changed 18 years ago by
Status: | started → infoneeded |
---|
Otto, can you update and see if any of the fixes I've committed help? I'd also appreciate it if someone can test storage and playgroup handling of non-ascii characters or report any other areas which fail to work.
comment:15 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | infoneeded → closed |
Attached a patch that fixes the issue by removing one .utf8() call.
I've tried to verify that this doesn't brake anything by recording various shows to recgroups with names containing non-ascii and just ascii characters.