Connecting Tech Pros Worldwide Forums | Help | Site Map

Copying from MS Word

Andy Jacobs
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi All

I've written a little CMS with a WYSIWYG editor from
www.interactivetools.com. Everything works ok until they try and copy text
from MS Word. When they do this, apostrophes change to a capital A with a
accent above it. It looks ok in the text box but the wrong character gets
put in the database. Then when you go back in and edit the page, the A
character is there and can be replaced.

If they replace the faulty character then it all works fine but it's just a
pain for the end user.

Can anyone throw any light on this?

Cheers
Andy


Nikolai Chuvakhin
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Copying from MS Word


Andy Jacobs <andy@redcatmedia.net> wrote in message
news:<BDA2918B.1DFE%andy@redcatmedia.net>...[color=blue]
>
> I've written a little CMS with a WYSIWYG editor from
> www.interactivetools.com. Everything works ok until they try
> and copy text from MS Word. When they do this, apostrophes
> change to a capital A with a accent above it.[/color]

It's an encoding issue. Word has a feature called "smart quotes",
which replaces (in a context-sensitive fashion) both single and
double quotes with either opening or closing quote. When this
gets converted from Word's internal encoding (which, if I remember
correctly, is UTF-16) into something less sophisticated (say,
Latin-1), the closing single quote is replaced by accented capital
A because it has the same number in the symbol table.

Cheers,
NC
Nel
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Copying from MS Word


"Nikolai Chuvakhin" <nc@iname.com> wrote in message
news:32d7a63c.0410250814.7b1d2c67@posting.google.c om...[color=blue]
> Andy Jacobs <andy@redcatmedia.net> wrote in message
> news:<BDA2918B.1DFE%andy@redcatmedia.net>...[color=green]
>>
>> I've written a little CMS with a WYSIWYG editor from
>> www.interactivetools.com. Everything works ok until they try
>> and copy text from MS Word. When they do this, apostrophes
>> change to a capital A with a accent above it.[/color]
>
> It's an encoding issue. Word has a feature called "smart quotes",
> which replaces (in a context-sensitive fashion) both single and
> double quotes with either opening or closing quote. When this
> gets converted from Word's internal encoding (which, if I remember
> correctly, is UTF-16) into something less sophisticated (say,
> Latin-1), the closing single quote is replaced by accented capital
> A because it has the same number in the symbol table.
>
> Cheers,
> NC[/color]

On a related issue - I use the same editor on some sites and would like a
user to be able to copy and paste from Word, but Word always pastes a load
of CSS junk behind the text.

Is there a way to just copy the text?

Thanks Nel.


Andy Jacobs
Guest
 
Posts: n/a
#4: Jul 17 '05

re: Copying from MS Word


On 25/10/04 7:02 pm, in article
417d416a$0$80699$ed2619ec@ptn-nntp-reader03.plus.net, "Nel"
<nelly@ne14.co.NOSPAMuk> wrote:
[color=blue]
> "Nikolai Chuvakhin" <nc@iname.com> wrote in message
> news:32d7a63c.0410250814.7b1d2c67@posting.google.c om...[color=green]
>> Andy Jacobs <andy@redcatmedia.net> wrote in message
>> news:<BDA2918B.1DFE%andy@redcatmedia.net>...[color=darkred]
>>>
>>> I've written a little CMS with a WYSIWYG editor from
>>> www.interactivetools.com. Everything works ok until they try
>>> and copy text from MS Word. When they do this, apostrophes
>>> change to a capital A with a accent above it.[/color]
>>
>> It's an encoding issue. Word has a feature called "smart quotes",
>> which replaces (in a context-sensitive fashion) both single and
>> double quotes with either opening or closing quote. When this
>> gets converted from Word's internal encoding (which, if I remember
>> correctly, is UTF-16) into something less sophisticated (say,
>> Latin-1), the closing single quote is replaced by accented capital
>> A because it has the same number in the symbol table.
>>
>> Cheers,
>> NC[/color]
>
> On a related issue - I use the same editor on some sites and would like a
> user to be able to copy and paste from Word, but Word always pastes a load
> of CSS junk behind the text.
>
> Is there a way to just copy the text?[/color]

There is a HTML Tidy plugin for the script but I tried it and it tidied
EVERYTHING. I never got to the bottom of the cause though.

Andy

Andy Jacobs
Guest
 
Posts: n/a
#5: Jul 17 '05

re: Copying from MS Word


On 25/10/04 5:14 pm, in article
32d7a63c.0410250814.7b1d2c67@posting.google.com, "Nikolai Chuvakhin"
<nc@iname.com> wrote:
[color=blue]
> Andy Jacobs <andy@redcatmedia.net> wrote in message
> news:<BDA2918B.1DFE%andy@redcatmedia.net>...[color=green]
>>
>> I've written a little CMS with a WYSIWYG editor from
>> www.interactivetools.com. Everything works ok until they try
>> and copy text from MS Word. When they do this, apostrophes
>> change to a capital A with a accent above it.[/color]
>
> It's an encoding issue. Word has a feature called "smart quotes",
> which replaces (in a context-sensitive fashion) both single and
> double quotes with either opening or closing quote. When this
> gets converted from Word's internal encoding (which, if I remember
> correctly, is UTF-16) into something less sophisticated (say,
> Latin-1), the closing single quote is replaced by accented capital
> A because it has the same number in the symbol table.[/color]

Thanks for that. I guess I can justify chucking that one straight back at
the customer then!

Cheers

Andy

Nel
Guest
 
Posts: n/a
#6: Jul 17 '05

re: Copying from MS Word



"Andy Jacobs" <andy@redcatmedia.net> wrote in message
news:BDA30E4F.2670%andy@redcatmedia.net...[color=blue]
> On 25/10/04 7:02 pm, in article
> 417d416a$0$80699$ed2619ec@ptn-nntp-reader03.plus.net, "Nel"
> <nelly@ne14.co.NOSPAMuk> wrote:
>[color=green]
>> "Nikolai Chuvakhin" <nc@iname.com> wrote in message
>> news:32d7a63c.0410250814.7b1d2c67@posting.google.c om...[color=darkred]
>>> Andy Jacobs <andy@redcatmedia.net> wrote in message
>>> news:<BDA2918B.1DFE%andy@redcatmedia.net>...
>>>>
>>>> I've written a little CMS with a WYSIWYG editor from
>>>> www.interactivetools.com. Everything works ok until they try
>>>> and copy text from MS Word. When they do this, apostrophes
>>>> change to a capital A with a accent above it.
>>>
>>> It's an encoding issue. Word has a feature called "smart quotes",
>>> which replaces (in a context-sensitive fashion) both single and
>>> double quotes with either opening or closing quote. When this
>>> gets converted from Word's internal encoding (which, if I remember
>>> correctly, is UTF-16) into something less sophisticated (say,
>>> Latin-1), the closing single quote is replaced by accented capital
>>> A because it has the same number in the symbol table.
>>>
>>> Cheers,
>>> NC[/color]
>>
>> On a related issue - I use the same editor on some sites and would like a
>> user to be able to copy and paste from Word, but Word always pastes a
>> load
>> of CSS junk behind the text.
>>
>> Is there a way to just copy the text?[/color]
>
> There is a HTML Tidy plugin for the script but I tried it and it tidied
> EVERYTHING. I never got to the bottom of the cause though.
>
> Andy
>[/color]
I have searched the www.interactivetools.com web site for the HTML Tidy
plugin and can't find it.

Can someone help me out please?

Nel


Warren Oates
Guest
 
Posts: n/a
#7: Jul 17 '05

re: Copying from MS Word


In article <418273b4$0$80700$ed2619ec@ptn-nntp-reader03.plus.net>,
"Nel" <nelly@ne14.co.NOSPAMuk> wrote:

:I have searched the www.interactivetools.com web site for the HTML Tidy
:plugin and can't find it.
:
:Can someone help me out please?
:

http://ca.php.net/manual/en/ref.tidy.php

I think this is what you want. It has a link:

http://tidy.sourceforge.net/

for the required libtidy, and also points out:

"If PEAR is available on your *nix-like system you can use the pear
installer to install the tidy extension, by the following command:
pear -v install tidy."

It also describes a cool bunch of functions (er, methods) to use.
--
Looks like more of Texas to me ...
-- from The Wild Bunch
Closed Thread