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)

x86
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: pavlov, Assigned: pavlov)

References

()

Details

(Whiteboard: [nsbeta3+])

Attachments

(1 file)

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.
Status: NEW → ASSIGNED
Keywords: 4xp, correctness, nsbeta3
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
nsbeta3+
Whiteboard: [nsbeta3+]
Target Milestone: --- → M18
i just attached a patch that does what you suggested... I still end up with ?s instead of "s. Any ideas?
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'.
right, I want both – and ” to end up as normal quotes.
– 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
oh, sorry. so what must I do to convert the smart quotes to a normal quote character?
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?
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.
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
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.
fixed
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
verified fix - copy & paste works fine using 20001101
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: