Olle Raab automagi at algonet.se
Wed Nov 20 00:30:51 CET 2002

02-11-15 08.39, skrev Rimgaudas Laucius följande:

>> At 00:12 14.11.2002, you wrote:
>>> At 16:25 11-11-2002, you wrote:
>>>>> At 14:06 07.11.2002, you wrote:
>>>>>> Hi.
>>>> 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. ?

> Why i am speeking about internationalization of fpc? The most important
> reason is that we use Pascal translator for teaching algorithms in the
> schools. Programs written in the native language are more comprehensible and
> readable for pupils.

//Olle Raab

More information about the fpc-devel mailing list