Closed Bug 410610 Opened 12 years ago Closed 12 years ago

Can't open a local HTML page that has accents (or other special chars) in its file name

Categories

(Toolkit :: Startup and Profile System, defect, minor)

x86
Windows Vista
defect
Not set
minor

Tracking

()

VERIFIED FIXED
mozilla1.9beta3

People

(Reporter: stifu, Assigned: benjamin)

References

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b3pre) Gecko/2008010205 Minefield/3.0b3pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b3pre) Gecko/2008010205 Minefield/3.0b3pre

The title says it all: it is no longer possible to open an HTML page that has accents (or other special chars) in its file name, from your hard drive.
It works, however, if you manually put the right URL in Firefox (as opposed to directly launching the page with Firefox).

Reproducible: Always

Steps to Reproduce:
1. Create a new HTML page on your computer
2. Name it "test_é.html"
3. Double click on it to open it
Actual Results:  
A new Firefox window is opened, with a blank URL. The page isn't loaded at all.

Expected Results:  
Load the page.
Could be from bug 396052.  Could you check the regression range?
Alright, but I won't be able to do so before the weekend.
Status: UNCONFIRMED → NEW
Component: General → XRE Startup
Ever confirmed: true
Product: Firefox → Toolkit
QA Contact: general → xre.startup
Target Milestone: --- → mozilla1.9 M11
Version: unspecified → Trunk
Assignee: nobody → benjamin
Attachment #295381 - Flags: review?(ted.mielczarek)
Attachment #295381 - Flags: review?(neil)
Comment on attachment 295381 [details] [diff] [review]
Use unicode DDE and fix the UTF16->8 conversion, rev. 1

>+DEFINES += -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE
Unfortunately it's not clear from the patch which functions this affects.
(Obviously it's clear which functions it doesn't affect, because of the As.)
It wasn't meant to affect any functions (I wanted them all to be explicitly A or W versions). But I see that I didn't explicitly specify ParseDDEArgW... I will do that before checkin.

If the windows headers would let me, I'd turn off all the automatic #defines and require everyone to specify A or W variants explicitly, but the SDK headers don't have an option for that.
I take it that means I can forget about looking for the regression range, heh ?

And thanks for the attention to that bug.
Comment on attachment 295381 [details] [diff] [review]
Use unicode DDE and fix the UTF16->8 conversion, rev. 1

Does CreateDDEData need to be converted to Unicode too?

I don't understand your comment about ParseDDEArg because that's not Windows API.
Attachment #295381 - Flags: review?(neil) → review+
Comment on attachment 295381 [details] [diff] [review]
Use unicode DDE and fix the UTF16->8 conversion, rev. 1

nit:
Index: toolkit/xre/nsWindowsRestart.cpp
   len = convert.write(arg, len);
-  s[len] = '\0';
+  convert.write_terminator();

You could ditch the assignment to len here, same in nsWindowsWMain.cpp.
Attachment #295381 - Flags: review?(ted.mielczarek) → review+
Sorry, I meant DdeQueryString not ParseDDEArg
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Oh, and this was a blocking regression.
Flags: blocking1.9+
Keywords: regression
Duplicate of this bug: 410546
Blocks: 396052
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008010811 Minefield/3.0b3pre 

VERIFIED FIXED based on bsmedberg's test case.  Please see the following wiki for the testcase and my results:

http://wiki.mozilla.org/MozillaQualityAssurance:bug_396052_test_plan#Results_.28ashughes.29_ROUND_2
Status: RESOLVED → VERIFIED
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in before you can comment on or make changes to this bug.