Topic: OEM <==> ANSI (1 of 4), Read 51 times, 1 File Attachment
Conf: Converting, Translating
From: Ian Binnie
Date: Sunday, May 02, 2004 09:48 AM

I had used the OEM to ANSI translation in the past, but had been less than happy with the result. I had assumed that this was just a limitation of the process, but discovered that a better translation (particularly of box drawing characters) is possible - merely by following the Microsoft OemToChar function (see attached for my version of this).

I created a new version of ansi.tbl, but this did not seem to change translations, although loading as a User translation table seemed to work.

Is ansi.tbl actually used, and if so why does replacing it not work?

I am using Vedit 6.12.1 03/28/04 and Windows XP Pro.

 
ANSI.TBL (1KB)

 


Topic: Re: OEM <==> ANSI (2 of 4), Read 59 times
Conf: Converting, Translating
From: Christian Ziemski
Date: Sunday, May 02, 2004 12:22 PM

Ian:

On Sun, 02 May 2004 09:48:00 -0400, you wrote:

>I created a new version of ansi.tbl, but this did not seem to change
>translations, although loading as a User translation table seemed to work.
>
>Is ansi.tbl actually used, and if so why does replacing it not work?

1) The translations "ANSI to OEM/OEM to ANSI" have been added in the
{Edit, Translate} menu as fixed entries long ago.

2) The entries "Translate from/to EBCDIC" are the default variable
translation and EBCDIC.TBL additionally is built in Vedit.

A look into vpw.exe (with Vedit itself, of course) shows that ANSI.TBL
(for 1.) and EBCDIC.TBL (for 2., as default) are built in byte by
byte.

Modifying the TBL files only has an effect on the variable menu
entries "Translate from/to" after loading the new table.


Those explanations are from my user's point of view.
Perhaps Ted can give more infos.

Christian

 


Topic: Re: OEM <==> ANSI (3 of 4), Read 56 times
Conf: Converting, Translating
From: Ted Green
Date: Sunday, May 02, 2004 04:39 PM

At 09:49 AM 5/2/2004, you wrote:
>I created a new version of ansi.tbl, but this did not seem to change translations, although loading as a User translation table seemed to work.
>
>Is ansi.tbl actually used, and if so why does replacing it not work?

VEDIT does not automatically load the ansi.tbl (or ebcdic.tbl) files.
If desired, the ustartup.vdm file could load a custom ebcdic.tbl file to replace the built-in table.

Since there was no way to load a custom ansi.tbl file, I just implemented it in the code and added comments to the ustartup.vdm file:

// Translate_Load("ebcdic.tbl") // Load custom translation table to replace
// // built-in EBCDIC/ASCII table
// Translate_Load("ansi.tbl",ANSI) // Load custom translation table to replace
// // built-in EBCDIC/ASCII table

I will reply again as soon as a new 6.12 is ready for testing.

Ted.


Ted.
-------------------------------------------------------------------------
Ted Green (ted@...) Greenview Data, Inc.
Web: www.... PO Box 1586, Ann Arbor, MI 48106
Tel: (734) 996-1300 Fax: (734) 996-1308 VEDIT - Text/Data/Binary Editor
-------------------------------------------------------------------------
Spam problems? www.SpamStopsHere.com blocks 99% of spam for businesses.

 


Topic: Re: OEM <==> ANSI (4 of 4), Read 63 times
Conf: Converting, Translating
From: Ian Binnie
Date: Sunday, May 02, 2004 09:54 PM

On 5/2/2004 4:39:16 PM, Ted Green wrote:
>At 09:49 AM 5/2/2004, you
>wrote:
>>I created a new version of ansi.tbl, but this did not seem to change translations, although loading as a User translation table seemed to work.
>>

>VEDIT does not automatically
>load the ansi.tbl (or
>ebcdic.tbl) files.
>If desired, the ustartup.vdm
>file could load a custom
>ebcdic.tbl file to replace the
>built-in table.
>
>Since there was no way to load
>a custom ansi.tbl file, I just
>implemented it in the code and
>added comments to the
>ustartup.vdm file:
>
>//
>Translate_Load("ebcdic.tbl")
>// Load custom translation
>table to replace
>//
>// built-in EBCDIC/ASCII
>table
>//
>Translate_Load("ansi.tbl",ANSI
>) // Load custom translation
>table to replace
>//
>// built-in EBCDIC/ASCII
>table
>
>I will reply again as soon as
>a new 6.12 is ready for
>testing.

I am not trying to disrupt your development. This is not a major item. I was trying to convert some OEM files, and followed up the subject on:-
http://www.sqldbu.com/eng/sections/tips/oem2ansi.html

It seems translations are language dependent. After playing about manually I wrote a simple C++ program to generate a custom ansi.tbl, and was disappointed that I could not load it.

I wrote a simple macro to replace the embedded ansi.tbl in Vedit, but not sure if I should post it. I don't really approve of patching programs.