Non-ascii calendar names are displayed wrong after restart

RESOLVED FIXED in 1.0b1

Status

defect
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: andrey, Assigned: ssitter)

Tracking

Trunk
1.0b1
Bug Flags:
blocking-calendar1.0 +

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.1b4) Gecko/20090423 Firefox/3.5b4 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.1b3pre) Gecko/20090223 Lightning/1.0pre Thunderbird/3.0b2

If I use Cyrillic in names of my Lightning calendars, these names becomes unreadable after I restart Thunderbird.
Seems this is because corresponding entry in Thunderbird\Profiles\*\prefs.js
user_pref("calendar.registry.4c95be29-0f2e-45b9-aa70-fe878a91157e.name", "I18n name here");
incorrectly written (this is not UTF-8, nor Windows-1251 or KOI-8R).

Reproducible: Always

Steps to Reproduce:
1. Create calendar with non-latin chars in the name.
2. Restart Thunderbird.

Actual Results:  
Can't read chars which was Cyrillic.

Expected Results:  
Same name as was entered during calendar create.

Cyrillic in any other parts of Lightning and Thunderbird is OK.
(Reporter)

Comment 1

10 years ago
Same with SunBird (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b5pre) Gecko/20090504 Calendar/1.0pre)
(Assignee)

Comment 2

10 years ago
Confirmed using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090504 Calendar/1.0pre.
Status: UNCONFIRMED → NEW
Component: Lightning Only → General
Ever confirmed: true
Flags: blocking-calendar1.0?
QA Contact: lightning → general
Summary: Lightning/1.0pre wrong transcoding of non-ascii calendar names → Non-ascii calendar names are displayed wrong after restart
Version: unspecified → Trunk
(Assignee)

Comment 3

10 years ago
Are there other calendar related preferences that should be stored as unicode? 
For example what about the URL of remote calendars?
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
Attachment #375693 - Flags: review?(philipp)
(Reporter)

Comment 4

10 years ago
Thank you for patch, I will test it in nightly build.

> Are there other calendar related preferences that should be stored as unicode? 
> For example what about the URL of remote calendars?

If I use Cyrillic in URL for remote calendars, Lightning correctly urlencodes it. And in prefs.js it stored in this urlencoded format:
user_pref("calendar.registry.8341dc74-9ce8-47f1-9142-d31f295e3a33.uri", "mysite/%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9.ics");
So, it is already stored in Unicode, safely urlencoded.

But if I open calendar Properties dialog, Lightning shows this URL in urlencoded form. It should better urlDEcode URL in this dialog (just like Firefox does in address line) to the source form, as it was initially entered.
(Reporter)

Comment 5

10 years ago
> Created an attachment (id=375693)
> store calendar name as unicode

Tested this patch with Cyrillic calendar names. It works, thank you! Please include the patched version of calCalendarManager.js into the trunk.
OS: Windows Vista → All
Hardware: x86 → All
We should make sure that our other user-visible preferences also use get/setLocalizedPref(), while we are at it.
Flags: blocking-calendar1.0? → blocking-calendar1.0+
Attachment #375693 - Flags: review?(philipp) → review+
Comment on attachment 375693 [details] [diff] [review]
store calendar name as unicode

Aside from a few extra spaces this patch looks fine. I'll take care of the checkin since I've let this sit for so long.
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/e15874514208>

-> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.