"John W. Krahn" wrote:

> You might get some help by looking at the source for Demoronizer
>
> http://www.fourmilab.ch/webtools/demoroniser/

Hi John,

Well, it was a cute read, I must say.  The only problem is that I'm not sure quite 
what application he was talking about.  You see, I just tested the text you suggested, 
along with a couple other lines of my own surrounding it.  I just re-installed Office 
2K so I haven't gotten around to killing the Auto-Correct and "Autoformat as you type" 
features.  So I got the smart quotes and dashes.  The dash [0x2c] remained, but the 
quotes were all turned to standard 0x27 '"'.  I threw in a couple other goodies, too, 
the most revealing of which was two ways to get a copyright to print in Word.

In the original Word in doc format, I used the insert|symbol... feature to insert the 
copyright mark before MS.  I used a text escape later, before apostrophes.  When I 
saved as text, the inserted symbol took on varied translations, but the text (c) was 
restored to the form originally entered.


#!/usr/bin/perl -w

use strict;

open IN, "<Okay.txt";
my @Lines = <IN>;
close IN;
foreach my $Line (@Lines) {
#  my $Line = <IN>;
  my @Chars = split //, $Line;
  print "\n$Line\n";
  foreach (@Chars) {
    my $num = ord($_);
   print "$_ $num\n";
  }
}


Perl Output:
E:\d_drive\perlStuff\guests>unichars.pl

Okay, here's a more extended test of the "moron" characteristics of (MS -Word.


O 79
k 107
a 97
y 121
, 44
  32
h 104
e 101
r 114
e 101
' 39
s 115
  32
a 97
  32
m 109
o 111
r 114
e 101
  32
e 101
x 120
t 116
e 101
n 110
d 100
e 101
d 100
  32
t 116
e 101
s 115
t 116
  32
o 111
f 102
  32
t 116
h 104
e 101
  32
" 34
m 109
o 111
r 114
o 111
n 110
" 34
  32
c 99
h 104
a 97
r 114
a 97
c 99
t 116
e 101
r 114
i 105
s 115
t 116
i 105
c 99
s 115
  32
o 111
f 102
  32
( 40
M 77
S 83
  32
- 45
W 87
o 111
r 114
d 100
. 46
  32
  32

 10

"Halt," he cried, "this is the police!"

" 34
H 72
a 97
l 108
t 116
, 44
" 34
  32
h 104
e 101
  32
c 99
r 114
i 105
e 101
d 100
, 44
  32
" 34
t 116
h 104
i 105
s 115
  32
i 105
s 115
  32
t 116
h 104
e 101
  32
p 112
o 111
l 108
i 105
c 99
e 101
! 33
" 34

 10

What did he mean by 'single quotes', anyway?  All I see is (c)apostrophes.

W 87
h 104
a 97
t 116
  32
d 100
i 105
d 100
  32
h 104
e 101
  32
m 109
e 101
a 97
n 110
  32
b 98
y 121
  32
' 39
s 115
i 105
n 110
g 103
l 108
e 101
  32
q 113
u 117
o 111
t 116
e 101
s 115
' 39
, 44
  32
a 97
n 110
y 121
w 119
a 97
y 121
? 63
  32
  32
A 65
l 108
l 108
  32
I 73
  32
s 115
e 101
e 101
  32
i 105
s 115
  32
( 40
c 99
) 41
a 97
p 112
o 111
s 115
t 116
r 114
o 111
p 112
h 104
e 101
s 115
. 46

 10




 10

E:\d_drive\perlStuff\guests>
EndPerlOutput

Word Output <<EndWord # pasted from Word into Netscape Communicator 4.79 on Win 2K
Okay, here's a more extended test of the “moron” characteristics of ăMS -Word.
“Halt,” he cried, “this is the police!”
What did he mean by ‘single quotes’, anyway?  All I see is ©apostrophes.

EndWord

NotePad Output
Okay, here's a more extended test of the "moron" characteristics of (MS -Word.
"Halt," he cried, "this is the police!"
What did he mean by 'single quotes', anyway?  All I see is (c)apostrophes.

End Word

Word after closing and re-opening:
Okay, here's a more extended test of the "moron" characteristics of (MS -Word.
"Halt," he cried, "this is the police!"
What did he mean by 'single quotes', anyway?  All I see is (c)apostrophes.

End Word

It is clear from this snippet that the copyright symbol does get translated 
differently.  In some cases it comes out as lt;, in others it comes out as a left 
paren.  I don't see any characters that had been inserted for ASCII showing this 
effect, though.

Perhaps the author was using the '97 version, and had not bothered to recheck his 
prejudices in the last three years.

Joseph




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to