Closed Bug 199898 Opened 23 years ago Closed 22 years ago

Custom header/footer in non-ASCII is displayed as garbage

Categories

(Core :: Printing: Output, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: kazhik, Assigned: dbaron)

References

Details

(Keywords: intl, Whiteboard: [patch])

Attachments

(1 file, 1 obsolete file)

Custom header/footer in non-ASCII is displayed as garbage. (1) Open "Page Setup" dialog and click "Margins and Header/Footer" tab. (2) Select "Custom" in one of the listbox of headers/footers. (3) Enter text in non-ASCII. (4) Relaunch Mozilla. (5) See the modified header/footer in "Page Setup" dialog. Reproduced: 2003032905-trunk/Linux, 2003032908-trunk/Win98
Blocks: 204013
Confimed on 2003052408.
Depends on: 171809
This is broken even on Unicode platforms (Win2k/XP, Unix UTF-8 locale)
Keywords: intl
It's written out correctly in prefs.js. The problem seems to be something with reading it back in.
Attached patch patch (obsolete) — Splinter Review
This fixes the problem for me, and seems to make sense. I'm a little puzzled as to why prefs supports an nsISupportsString API for writing prefs, which makes the writing/reading asymmetric and leads to things like this.
taking
Assignee: printing → dbaron
Whiteboard: [patch]
Comment on attachment 136885 [details] [diff] [review] patch great. someday, we may wanna clean up nsString in the file. r=jshin
Attachment #136885 - Flags: review?(jshin) → review+
Attachment #136885 - Flags: superreview?(bz-vacation)
Comment on attachment 136885 [details] [diff] [review] patch The pref is set by SetComplexValue, right? So you want to use GetComplexValue to retrieve it... The fact that prefs stores nsISupportsString complex values as UTF-8 is an implementation detail of prefs that this code should not rely on, imo.
Attachment #136885 - Flags: superreview?(bz-vacation) → superreview-
Attached patch patchSplinter Review
ok, let's rely on the current storage to convert it to a reasonable mechanism.
Attachment #136885 - Attachment is obsolete: true
Attachment #136887 - Flags: superreview?(bz-vacation)
Attachment #136887 - Flags: review?(jshin)
Comment on attachment 136887 [details] [diff] [review] patch OK, that works.
Attachment #136887 - Flags: superreview?(bz-vacation) → superreview+
Comment on attachment 136887 [details] [diff] [review] patch r=jshin
Attachment #136887 - Flags: review?(jshin) → review+
Comment on attachment 136887 [details] [diff] [review] patch a=chofmann for 1.6
Attachment #136887 - Flags: approval1.6? → approval1.6+
Fix checked in to trunk, 2003-12-11 10:42 -0800.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Fix was verified with 2004012209-trunk on Japanese MS Windows 2000(SP4). Thanks.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: