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

Re: XYWRITE digest 1162





XyWriters-
I have to convert ASCII to ANSI all the time in terms of foreign accent marks. I write files of statistics that include lots of foreign names and they need to be converted into Word, or Excel, or FoxPro, all of which use ANSI. I have a conversion program I call FPCONVRT.XYP (and also FPREVERT.XYP to get back to XyW) that makes the correct changes in my XyW fles. I then run WordPort to get the Word files, or simply import the XyW files as text files to get them into Excel or FoxPro. These conversion files work flawlessly for the foreign letters with diacritical marks and anybody could use a similar method to create such a file for all ASCII to ANSI characters.
The program (I'll send it to anybody who wants it) uses a conversion of the
ASCII to a "dummy" code first. All the dummy codes look like the following:

#e&:#      =    ë
#a&'"      =    á
The dummy codes are then converted into to final ANSI character. The XyWrite file then looks rather strange, as all the accented marks appear to be incorrect.
The conversion to dummy codes is necessary. If you try to do it in one
step, a later line in the file may possibly overwrite the original
conversion, and you end up with gibberish (see, for example, the aloe vera
posting).
Again, I don't have all 256 ASCII to ANSI coded in, only the foreign
character marks, and one should remember that this is also somewhat
specific to the printer file I've chosen in XyW3. But anybody could make
up this conversion program pretty quickly. To find the ANSI equivalents
(which were not obvious to me), I created a file of a series of characters,
labelled MSW-134, MSW-157, etc., and dumped that into Microsoft products to
see what came out. In Word, Excel, Access, and FoxPro, all three had the
same characters so they all use the same ANSI set. From that I could
develop the conversion file.


Bill