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

Re: DOS v Win encoding



A ferry ferry long time ago, "za man" Robert Holmgren wrote:

> Believe it or not, CLIP.EXE actually
> converts to Unicode and then back to single byte -- so it would
> be a trivial matter to adapt CLIP.EXE to do SBCS to Unicode
> conversions and v.v. -- not that I see a particular use for
> that.)

I didn't respond at the time (too buried), but I for one, in my
particular environment, do actually see a good use for that, and I would
be extremely grateful if you could tell me how to have CLIP.EXE convert
between UTF-8 and SBCS (CP 850).

I have the latest version of U2 (v119, Oct 2007) installed, and my
version of CLIP.EXE dates from 12-30-05 (28672 bytes).

Pasting between the Windows clipboard and XyWrite 4 for DOS
(non-Ansified, code page 850) works fine, in both directions, as long as
there are no characters above bog-standard "lower ASCII" set. But
anything that contains, say, an umlaut or another character above ASCII
126 gets truncated (not only does the offending character get gobbled,
anything after it, even if lower ASCII, also never arrives when pasting
from XyWrite to Windows. The end of the copied string is always a
spurious "1". When going in the other direction, the string does not get
truncated but "higher ASCII" is turned into lower ASCII characters.

The aspect that is particular to my environment is that I am using the
Japanese version of Windows XP Professional, and the Japanese version of
MS Word (and other Office applications, which behave in the same way). I
believe (but I am not sure about that) that the Windows clipboard in
this case is UTF-8 rather than ANSI based, and that this is causing the
problem.

Test sentence in XyWrite:
Some umlauts and es-zet ä ü ö Ä Ö Ü ß followed by lower-ASCII
text

After pasting via Clip.exe into MS Word or any Windows program:
Some umlauts and es-zet 1

Test sentence in Word:
Some umlauts and es-zet ä ü ö Ä Ö Ü ß followed by lower-ASCII
text

After pasting via Clip.exe into XyWrite:
Some umlauts and es-zet a u o A O U s followed by lower-ASCII text
(umlauts stripped and turned into lower ASCII)

It is not a life or death problem, and I took my sweet time in asking
this question, so please feel free to take your time in answering. But
thanks in advance for any help.

This message is encoded in UTF-8. I hope the umlauts etc. make it
through.

Wolfgang Bechstein
bechstein@xxxxxxxx