Closed
Bug 46729
Opened 25 years ago
Closed 25 years ago
“ or ” should paste (plaintext) as a normal quote instead of as a question mark
Categories
(Core :: XUL, defect, P3)
Tracking
()
RESOLVED
FIXED
M18
People
(Reporter: pavlov, Assigned: pavlov)
References
()
Details
(Whiteboard: [nsbeta3+])
Attachments
(1 file)
|
2.82 KB,
patch
|
Details | Diff | Splinter Review |
See http://bugzilla.mozilla.org/show_bug.cgi?id=38016 for earlier discussion of
this. Basically we should convert smart quotes to normal quotes when pasting as
plain text before we convert to plain text so that we don't paste question
marks.
| Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 1•25 years ago
|
||
There is an interface to do a charset conversion and transliteration,
see nsISaveAsCharset.idl. So the current charset conversion part can be replace
by that.
Basically, call Init() first to specify fallback behavior for charset conversion
failure then call convert().
For plain text, following flags can be specified for Init().
nsISaveAsCharset::attr_FallbackQuestionMark
nsISaveAsCharset::attr_EntityAfterCharsetConv
nsIEntityConverter::transliterate
| Assignee | ||
Comment 3•25 years ago
|
||
| Assignee | ||
Comment 4•25 years ago
|
||
i just attached a patch that does what you suggested... I still end up with ?s
instead of "s. Any ideas?
Comment 5•25 years ago
|
||
The patch looks fine. I applied the patch and I copied three characters –
” and Ć. Then I was able to paste into 4.x as – ” C'.
| Assignee | ||
Comment 6•25 years ago
|
||
right, I want both – and ” to end up as normal quotes.
Comment 7•25 years ago
|
||
– is 0x2013 "EN DASH"
” is 0x201D "RIGHT DOUBLE QUOTATION MARK"
so the mapping is working correctly
“ is 0x201C "LEFT DOUBLE QUOTATION MARK"
I will change the summary.
Summary: – or ” should paste (plaintext) as a normal quote instead of as a question mark → “ or ” should paste (plaintext) as a normal quote instead of as a question mark
| Assignee | ||
Comment 8•25 years ago
|
||
oh, sorry. so what must I do to convert the smart quotes to a normal quote
character?
Comment 9•25 years ago
|
||
I think your patch already does that.
But I realized that I cannot test that on NT since copy/paste is done by
unicode.
Is that not working on Unix with your patch?
| Assignee | ||
Comment 10•25 years ago
|
||
nope, they come out as ?s :(
when I get in today, I will show you... maybe you can help me figure out what is
going on.
Comment 11•25 years ago
|
||
I found that charset converter is putting question marks.
I filed a bug 48284. An encoder I am getting in nsISaveAsCharset is somehow
cached and its state is affected by the fallback behavior set by someone else.
Since the encoder does it own fallback, nsISaveAsCharset does not have a chance
to do its fallback (e.g. transliteration).
Depends on: 48284
Comment 12•25 years ago
|
||
I created a patch for bug 48284. With that patch, your patch works.
I was able to pasted “ and ” from 6.0 to 4.x without question marks.
| Assignee | ||
Comment 13•25 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 14•25 years ago
|
||
verified fix - copy & paste works fine using 20001101
You need to log in
before you can comment on or make changes to this bug.
Description
•