special symbol
Brian K. White
brian at aljex.com
Sat May 29 15:00:25 PDT 2004
Richard D. Williams wrote:
> Does anyone know the code to produce this symbol, §?
>
> I have looked at the filepro help for chras/ code and I can not find
> it there.
>
> Thanks,
> Richard D. Williams
That character simply doesn't exist in some character sets.
You have 255 characters to choose from, and generally about 100 of them are
the same in all of the germanic/english character sets
(us-ascii/latin-*/codepage-437, codepage-850/etc...) which are the basic
english alphanumerics.
There is no particular ascii value for odd characters like that. it could be
character 221 in one set, and character 164 in another, and not exist at all
in most.
If you are talking about printed output or output to rich file formats like
html or pst script or pdf, then you have the ability to specify a specific
character set (think of it as a language or alphabet) and then simply write
the ascii value for that character in that character set.
If you are talking about displaying on a filepro screen then you have to
know what character set you are running filepro in.
The basic ibm/vga/cp437 character set that dos screens and some unix
emulations use simply does not contain the character anywhere.
In the case of unix via terminal emulator, it is possible to issue an escape
code to switch to an alternate character set, print a character, then issue
an escape code to return to the normal character set. Sometimes there is
also a a similar code that would be handier for this particular case, that
says "switch to alternate character for the next 1 byte" so you don't have
to issue the code to revert. In this case the font chosen in terminal
emulator properties is also a factor. From unix you can issue a standard
code that says "switch to alt char set 1, 2, 3, or 4" but you can't specify
what those character sets actually are. You can't say for example "switch to
latin-2" all you can say is "switch to alternate-#". What the different
character sets actually are is controlled by the terminal emulator software
and the font it is using.
That said...
recent versions of linux are defaulting now to a different model for dealing
with displaying and handling strings and data is not assumed to be in any
particular laguage but is displayed in unicode, which is like a super
grandaddy character set that includes all character sets and requires
several bytes for each visible character, and in that case you can specify
any character you want explicitly and it's less of a guessing game hoping
the client machine viewing the screen is using the same font with the same
encoding as you are. The client needs to be using unicode, which most aren't
yet, but once they are difficulties like above go away.
You might be able to generate a utf-8 (unicode) file from filepro for
printing or displaying, but you are not going to be able to use filepro on a
unicode terminal.
The best you can do here is ensure that the client and the server are both
speaking "Latin-1" This is the default in SCO and some linux & freebsd but
many of us go out of our way to keep the console and all apps using codepage
437 which is the character set universally built-in to video cards (at least
in the u.s.)
If you _don't_ run "mapchan -n" at the sco console or in one of the "good"
sco ansi emulators, then your display font & character set should be latin-1
and a chr("167") in filepro should display it, or "\0247" in an echo command
at the unix command line or in a shell script.
here are all the latin-1 characters and several ways to evoke them:
http://www.idautomation.com/ascii-table.html
Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
More information about the Filepro-list
mailing list