[fpc-devel]unicode

Rimgaudas Laucius rimga at ktl.mii.lt
Fri Dec 13 16:10:03 CET 2002


----- Original Message -----
From: "Olle Raab" <automagi at algonet.se>
To: <fpc-devel at deadlock.et.tudelft.nl>
Sent: Wednesday, November 20, 2002 12:30 AM
Subject: Re: [fpc-devel]unicode



> >>>> Yes it is true. But i am interesting about support of other than
basic
> > latin
> >>>> simbols in idetificators (a.e. variables) also and about problems
> > related
> >>>> with it (a.e. one of problems windows dlls do not support unicode
> >>>> identificators of exported routines).
> >>>
> >>> The problem is the linker and assembler that only support normal ascii
> >>> symbols.
> >
> > I do not know what you mean saying "normal ascii simbols". Ascii is
standart
> > for 7 bit characters but many of people use it talking about 8 bit
> > standarts.
> > The linker and assembler supports 8 bit characters (i tayed it under
> > windows).
> >
>
> As I see it, they do only support a subset of 7-bit ascii, namely those
> constituting valid identifiers. At least in the general case, but of
course
> it differs between different assemblers and linkers. E g PPCAsm for MacOS
> supports only symbols which is consided valid identifier (as in C or
> Pascal). That is they must be in the range _,A..Z,a..z,0..9 and not start
> with a digit.
>
> To make FreePascal true cross-platform and to avoid problems, identifiers
> should be valid pascal of C identifiers, IMO.
>
> But, as I can see, the problem could be solved if unicode names is encoded
> to names with chars in the above range. When symbols are parsed by the
> compiler, they could be converted, and stored as such internally. Error
> messages bounced back to the user is translated back to Unicode.
>
> I dont know which encoding scheme could be used. Can UTF-8 or UTF-7 be
used,
> do they translate a valid unicode identifier to a valid ascii identifier.
?

I think it is good idea to encode unicote to utf. I think it is the best to
encode to UTF-8. It is not difficult to adapt fpc to it, but it needs some
changes for tools used with fpc. As i tested asw and ldw supports 8 bit
symbols, but libgdb does not. Is it difficult to adapt it too?





More information about the fpc-devel mailing list