nptest.rc doesn't compile with windres

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: jacek, Assigned: jacek)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.08 KB, patch
jfkthame
: review+
Details | Diff | Splinter Review
Assignee

Description

9 years ago
Posted patch fix v1.0 (obsolete) — Splinter Review
windres (mingw rc compiler) doesn't like UTF-16 files like nptest.rc. It was converted by test for bug 607121. The same effect can be achieved using UTF-8 file. It's also nicer for developers. Currently diffs for this file show up as binary diffs.

For that reason I'm attaching the converted version instead of diff. It was generated using iconv and the only manual change was for codepage pragma.
Attachment #505228 - Flags: review?(jfkthame)
Comment on attachment 505228 [details] [diff] [review]
fix v1.0

If you can figure out how to make this work, I'd be delighted - I'd much rather have UTF-8 source. But unfortunately, this does not work as it stands, at least with the MS resource compiler; the DLL ends up with a string where each UTF-8 byte has been "converted" to unicode through codepage 1252, so the Unicode text we're trying to test gets destroyed.
Attachment #505228 - Flags: review?(jfkthame) → review-
Summary: notest.rc doesn't compile with windres → nptest.rc doesn't compile with windres
Assignee

Comment 2

9 years ago
Posted patch fix v1.1Splinter Review
The previous patch showed in hexdump the char U2122, so I assumed it would be fine.

Now I've found better way to achieve it, we don't even need UTF-8 for that. All we need is using L"" instead of "" for quoting strings together with \x escaper. The attached nptest.rc gives me byte-to-byte identical .res file on VS10 to current m-c version and works fine with windres.
Attachment #505228 - Attachment is obsolete: true
Attachment #505404 - Flags: review?(jfkthame)
Comment on attachment 505404 [details] [diff] [review]
fix v1.1

Great, thanks!
Attachment #505404 - Flags: review?(jfkthame) → review+
Assignee

Comment 4

9 years ago
http://hg.mozilla.org/mozilla-central/rev/8aac5bdd2796
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.