Subject Re: alfa omega delta
From Andy Taylor <andy.taylor.1959@outlook.com>
Date Sat, 21 Mar 2020 11:57:28 -0400
Newsgroups dbase.getting-started

Ricardo,

Building on Mervyn's post how about:
1) build your full text string in dBASE (using "abcd" for alpha, beta, etc).
2) save to text file
3) use OLE automation and open Word (or Excel, I guess).
4) open text file
5) set font to symbol (has full Greek alphabet as normal text, so numbers will stay as numbers but text gets converted to Greek)
6) output from Word or Excel to text file

Good luck and come back here with any apparent roadblocks.
Andy

> On 20/03/2020 18:12, Ricardo Fernández wrote:
> > Hi,
> > I have to program a text file output of a series of astronomical data, and in that text I must include symbols, letters, as units of measurement. Greek alpha, omega and Delta.
> > I have NOT been able to find a way to obtain and include these symbols in the program.
> > I would appreciate if someone knows the solution that would tell me where to start.
> > Greetings
> > Ricardo
> >
>
> In a plain text file this is probably not possible.  (CYA statement.
> I've been caught out far too often saying "can't be done" and then
> someone does provide a solution. :-) )
>
> You may be able to do something by using OLEAutomation to create a .doc
> file in Word as you then you would be able to use a Greek font applied
> to specific characters.  Word will also accept Uni-code characters from
> the keyboard by holding down the Alt key and inputting the decimal value
> for the Uni-code character using the numeric keypad but I haven't tried
> writing them from dBASE.
>
> There is an article on accessing Word from dBASE in issue 16 of the
> dBulletin. https://www.jpmartel.com/bulletin.htm
>
> If your user will accept a .pdf file instead of a plain text file then,
> depending on the contents and layout of your proposed text file, you may
> be able to create the file as a report using the dBASE report designer.
> If this is the case adding Uni-code characters is possible.
>
> function TEXTNAME1_canRender()
>     cOmega = space(1)
>     cOmega.setbyte(1,0x03)
>     cOmega.setbyte(0,0xa9)
>     this.text = trim(this.form.fish1.rowset.fields["name"].value)+' '+cOmega
>     return true
>
> You will find a list of Uni-code characters at
> https://en.wikipedia.org/wiki/List_of_Unicode_characters
>
> Mervyn.
>