[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Using XyWrite file in Word... [and "Euro symbol"]



** Reply to message from "Patricia M. Godfrey"  on Fri, 17
Nov 2006 17:54:28 -0500


> Fortunately for me,
> coying and pasting using CLIP seems to keep the cap C
> cedilla, while importing as text in Word 2000 yields
> the euro.

Not real sure what you mean -- what's the CLIP vs. "importing as text"
distinction that you're making here?

> But while that's good for my purposes, it's
> not supposed to do that, is it?

If I type "This is a Cedilla Ç" in XyWrite, then Copy it with CLIP, I get "This
is a Cedilla Ç" when I Paste that in Microsoft Word. XyW command line is
empty, so *CodePage conversion* occurs by default: "Ç" is char 128 in CodePage
850, and converted to char 199 in CodePage 1252.

If I do ditto in XyWrite with "1252" (the default) on the command line, I also
get "This is a Cedilla Ç" in MSWord (because "1252" on the CMline is the
same
as the default, i.e. no CMline argument [or, anyway, no CMline argument that
CLIP considers relevant -- you would only need to be concerned about the
content of your CMline if it consisted entirely of numbers -- that could
confuse CLIP fatally]).

If I do ditto in XyWrite with "850" on the command line, when I Paste in MSWord
I get "This is a Cedilla ?". Note that the cursor must be in text, otherwise I
would Copy the string "850", duh.

The logic of this (which can be confusing, but is intended to be as flexible as
possible) is:

A command line argument (437|850|1252, default=1252) represents:
 the target CP when Copying from XyWrite
   or
 the source CP when Pasting to XyWrite

Thus, when you Copy a Cedilla but put "850" on the CMline, the assumption is
that you will put char 128 (not 199) in the *target* app, which *should* be
*another 850 app*! But if by mistake you Paste into a 1252 app like MSWord,
you will get char 128 (? in CP1252) instead of char 199 (Ç in CP1252). Another
way to think of this is that if you put, on the CMline, the current CodePage
number of XyWrite, the character *numbers* that you copy will be exactly
preserved (with the attendant danger that if you copy into an app in a
different CodePage, you may get very different characters than XyWrite
displayed). Power = Complexity.

In sum, the default is interaction between XyWrite (437|850) and a Windows
application (1252). But all other combinations are available. E.g.: ANSIfied
XyWrite runs in 1252; and the target app may operate in any of the three
CodePages. (Indeed, I seem to recall that I built this application to enable
ANY single-byte character set (SBCS) CodePage to be argued, not just 437, 850,
or 1252.)

Note that, on NT anyway, the underlying Unicode API is smart. It sometimes
seems to know on its own what CodePage the current app uses, and converts to
that CodePage automatically, overriding your CMline argument. This can happen,
e.g., on the DOS command line (I am not going to reboot right now, just to
determine whether that happens because I always explicitly use a CHCP argument
when I boot my Win2K machine). You need to experiment.

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------