Closed
Bug 104305
Opened 23 years ago
Closed 3 years ago
-P commandline option doesn't work with non-Native char profile names
Categories
(Core :: Internationalization, defect, P3)
Tracking
()
RESOLVED
WORKSFORME
mozilla1.3alpha
People
(Reporter: ruixu, Unassigned)
References
Details
(Keywords: intl)
Attachments
(1 file, 4 obsolete files)
3.52 KB,
patch
|
brendan
:
superreview+
|
Details | Diff | Splinter Review |
Build: 2001-10-10 094 branch.
Steps:
1. Pre-create a new profile with double-byte char name.
2. Using netscp6 -P <double-byte char name created at step 1> to launch
browser.
Actual:
Profile Manager appears, cannot launch browser with both DBCS and unicode
double-byte char names.
Updated•23 years ago
|
Status: NEW → ASSIGNED
Comment 2•23 years ago
|
||
Comment 3•23 years ago
|
||
*** Bug 101581 has been marked as a duplicate of this bug. ***
Comment 4•23 years ago
|
||
Comment 5•23 years ago
|
||
nhotta: can you review the patch?
10/23/01 18:56 is the real patch.
10/23/01 19:08 is just to show you what's really fixed.
Comment 6•23 years ago
|
||
Please check the result of ConvertStringToUnicode.
I think this should be reviewed by module owner (ccarlen?).
Updated•23 years ago
|
Attachment #54821 -
Attachment is obsolete: true
Updated•23 years ago
|
Attachment #54820 -
Attachment is obsolete: true
Comment 7•23 years ago
|
||
Comment 8•23 years ago
|
||
ccarlen: can you review?
======= ccing ccarlen@netscape.com
Comment 9•23 years ago
|
||
The patch looks good. I know the whitespace in that file isn't good, but is it
bad enough to warrant wiping out all the CVS blame info?
Comment 10•23 years ago
|
||
ccarlen: I was asked few times to fix some of indentations within
the function by the super reviewers.
In this patch, I correct only for nsProfile::ProcessArgs()
which turns out to be about 200 lines of code out of 2500 lines
in the nsProfile.cpp
If you feel it's not justifiable, then I'll post a new patch
just to include my changes.
Comment 11•23 years ago
|
||
It seems like most of this blame info which would be changed is fairly old, and
I don't know if I've looked at it often, so go ahead. r=ccarlen.
But still, it's something to think about - cleaning up whitespace is good but
has to be weighed against the loss of blame info.
Comment 12•23 years ago
|
||
Comment on attachment 55090 [details] [diff] [review]
Adding ASSERT for GetPlatformCharset(),ConvertStringToUnicode()
r=ccarlen
Attachment #55090 -
Flags: review+
Comment 13•23 years ago
|
||
brendan: can you super review?
The patch (10/25/01 10:40) includes bunch of tab/indentation corrections.
You may want to review the smaller patch (10/23/01 19:08) which only
displays what is really changed, execpt the assertions in case
GetPlatformCharset() and ConvertStringToUnicode() fail.
Thanks
Whiteboard: Need /sr=
Comment 14•23 years ago
|
||
ccarlen: cvsblame lets you find blame for old revs, so you can "look past" a
whitespace cleanup checkin. There's a webtools bug on file to make this easier
to use.
I still think we should not use nsAutoString& in formal parameter lists. Cc'ing
jag for best advice, I think nsAWritableString& is good but I welcome the latest
wisdom from the mountain.
/be
Comment 15•23 years ago
|
||
Brendan's correct. Instead, try this:
+extern nsresult ConvertStringToUnicode(const nsString& aCharset, const char*
inString, nsAString& outString);
+extern nsresult GetPlatformCharset(nsString& aCharset);
To use nsAString& all through you'd have to fix up nsIPlatformCharset and
nsICharsetConverterManager (or switch to using nsICharsetConverterManager2?).
Comment 16•23 years ago
|
||
Since it is an out parameter and we expect the function to modify it would
a nsAWritable string be more declarative here?
+extern nsresult ConvertStringToUnicode(..., nsAString& outString);
Comment 17•23 years ago
|
||
Comment on attachment 55090 [details] [diff] [review]
Adding ASSERT for GetPlatformCharset(),ConvertStringToUnicode()
post a new patch
Attachment #55090 -
Attachment is obsolete: true
Comment 18•23 years ago
|
||
Comment 19•23 years ago
|
||
Comment on attachment 55757 [details] [diff] [review]
Use nsString and nsAWritableString in formal parameter lists
carry over r=ccarlen.
brendan: can you /sr= ?
Attachment #55757 -
Flags: review+
Comment 20•23 years ago
|
||
Comment on attachment 55757 [details] [diff] [review]
Use nsString and nsAWritableString in formal parameter lists
Do you need to test 'if (cmdResult)' given the successful return values?
Don't add tabs:
+ if (cmdResult) {
+ foundProfileCommandArg = PR_TRUE;
+
+ // get a platform charset
Lot of reformatting -- are you converting the file to two-space indentation?
See the Emacs modeline at the top, and notice the matching indentation (if
you treat tabs as four-space equivalent).
Either stick with 4-space for now and convert to 2-space
later, or do it all now. How about a diff -wu for easier reviewing, in
addition to diff -u?
/be
Comment 21•23 years ago
|
||
Updated•23 years ago
|
Attachment #55757 -
Attachment is obsolete: true
Comment 22•23 years ago
|
||
brendan: i didn't realize the Emacs modeline saids 4-space.
Removing the reformat.
>Do you need to test 'if (cmdResult)' given the successful return values?
'rv = ProfileExists(currProfileName.get(), &exists);'
and
'rv = CreateNewProfile(currProfileName.get(), currProfilePath,
nsnull, PR_TRUE);'
test the validity of the cmdResult.
Comment 23•23 years ago
|
||
Comment on attachment 55785 [details] [diff] [review]
Removing reformating.
Ok, thanks. Some frown on strtok, but I'm old-school. Other threads
can't safely use it, no big loss.
/b
Attachment #55785 -
Flags: superreview+
Comment 24•23 years ago
|
||
checked into the trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 25•23 years ago
|
||
Verified with build 2001-11-16 trunk.
The DBCS handling has been fixed! Still can repro with some unicode chars and need more fix on unicode.
Reopen.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 26•23 years ago
|
||
moving to Unicode Milestone.
Status: REOPENED → ASSIGNED
Target Milestone: mozilla0.9.6 → mozilla1.1
Comment 27•23 years ago
|
||
nsbeta1-
the original problem is fixed, remaining issue is for non default locale support
Reporter | ||
Comment 28•23 years ago
|
||
This bug also happened with CHT chars on CHT WinNT/Win2K, and KOR chars on KOR
WinNT/Win2K.
Comment 29•23 years ago
|
||
In comment #25,
>The DBCS handling has been fixed! Still can repro with some unicode chars and
need >more fix on unicode.
Could you elaborate what is fixed and what is the remaining problem?
Reporter | ||
Comment 30•23 years ago
|
||
From technical point, any char in locale default DBCS can be handled after this
fix, and any char outside locale default DBCS still cannot be handled.
From user point, even if using double-byte chars with the system default
standard Windows IME on a CHT or KOR WinNT/2K/XP, user cannot use certain
double-byte chars on our product since we don't fully support Unicode but system
IME and OS support Unicode.
Comment 31•23 years ago
|
||
Mozilla can't support char outside of its Native CodePage
unless we convert Moz to an Unicode app. ( calling W API won't help )
I believe those CHT chars on CHT WinNT/Win2K are not in the CHT code page.
Comment 32•23 years ago
|
||
something went wrong. Summary has changed... don't know why.
QA Contact: ylong → ruixu
Summary: Files are not opened, if the path or file name contains some high-ascii or double-byte characters → P option doesn't work with double-byte char profile names
Reporter | ||
Comment 33•23 years ago
|
||
I agree with Roy's comments. we really need Moz as an Unicode app.
Reporter | ||
Comment 36•23 years ago
|
||
Can repro this bug with US N6.2.1 on SC WinXP under SC codepage.
OS: Windows 2000 → Windows XP
Comment 37•22 years ago
|
||
nsbeta1+ for m1.2final release.
Updated•22 years ago
|
Target Milestone: mozilla1.2alpha → mozilla1.2beta
Comment 38•22 years ago
|
||
changing summary to reflect the remaining issue
Summary: P option doesn't work with double-byte char profile names → P option doesn't work with non-Native char profile names
Comment 39•22 years ago
|
||
ftang: Unless we change ( //xpfe/bootstrap/nsAppRunner.cpp )
int main(int argc, char* argv[])
to
int wmain(int argc, wchar_t *argv[ ], wchar_t *envp[ ]) // MS specific
We won't be able to fix this problem.
As it stands right now, we _can_ support the native Profile name thru -P
the CmdLine argument; but unless we do the above, we are stuck.
I need your and others input for this.
Whiteboard: [eta:8/16/2002]
Comment 40•22 years ago
|
||
correction: "we _can_ support" -> "we _are_ supporting"
Comment 41•22 years ago
|
||
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getcommandline.asp
GetCommandLine
The GetCommandLine function retrieves the command-line string for the current
process.
LPTSTR GetCommandLine(void);
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/commandlinetoargvw.asp
CommandLineToArgvW
The CommandLineToArgvW function parses a Unicode command-line string. It returns
a pointer to a set of Unicode argument strings and a count of arguments, similar
to the standard C run-time argv and argc values. The function provides a way to
obtain a Unicode set of argv and argc values from a Unicode command-line string.
LPWSTR* CommandLineToArgvW(
LPCWSTR lpCmdLine,
int* pNumArgs
);
Comment 43•22 years ago
|
||
timeless: thanks, I'll see what I can do with it.
Updated•16 years ago
|
Severity: critical → major
QA Contact: ruixu → i18n
Summary: P option doesn't work with non-Native char profile names → -P commandline option doesn't work with non-Native char profile names
Comment 45•16 years ago
|
||
Does this bug still exist? Seems like it should have been fixed by bug 396052.
Comment 46•16 years ago
|
||
Yes. this is already fixed at past year. This is MacOS 9 issue, not MacOS X.
Comment 47•16 years ago
|
||
Opps. this isn't MacOS. But I think that this is already fixed by bug 396052.
Comment 48•6 years ago
|
||
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
Comment 49•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months and this bug has severity 'major'.
:m_kato, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: tetsuroy → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(m_kato)
Comment 50•3 years ago
|
||
per comment #47
Status: NEW → RESOLVED
Closed: 23 years ago → 3 years ago
Flags: needinfo?(m_kato)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•