[fpc-devel] Re: EBCDIC ( was On a port of Free Pascal to the IBM 370)
Tomas Hajny
XHajT03 at hajny.biz
Mon Jan 30 23:58:43 CET 2012
On 30 Jan 12, at 20:38, Sven Barth wrote:
> On 30.01.2012 20:31, steve smithers wrote:
> >> Hans-Peter Diettrich wrote on Mon, 30 Jan 2012 17:40:27 +0100
> >> Existing source code frequently assumes ASCII encoding. The obvious are
> >> upper/lowercase conversions, by and/or or add/sub constant values to the
> >> characters. It will be hell to find and fix all such code in the
> >> compiler and RTL, even if only the constants have to be modified for
> >> EBCDIC. Even code with the assumed order of common characters (' '< '0'
> >> < 'A'< 'a') has to be found and fixed manually - how would you even
> >> *find* code with such implicit assumptions?
> >
> > It does indeed. I am aware of the problems inherent in this. But the RTL
> > has to be more or less rewritten anyway to support OS. OS is a very different
> > animal to Windows or Linux.
>
> The RTL consists of two parts (though the border is not easily visible):
> a platform independant one and a platform dependant one. A port to a
> different target normally only includes touching the platform dependant
> one, but a port to 370 also requires touching the platform independant
> one. This is what DoDi talks about.
>
> @other devs: Could the code page aware AnsiString type be of any help here?
I suspect that this would not be enough since there are still hard-
coded assumption about control codes to be located in #0..#31 on all
SBCS encodings, etc.
Tomas
More information about the fpc-devel
mailing list