use a single byte API for file system operations
+ FPCRTL_FILESYSTEM_TWO_BYTE_API define that is set for targets where we
use a single byte API for file system operations
o in principle, both can be set if both are supprted and implemented in
the RTL in order to minimise conversions depending on the scenario
git-svn-id: branches/cpstrrtl@24991 -
o resolved conflict in updated morphos sysutils unit
o moved code that had been added to the now deleted sysunix.inc to the
unix-specific block of the fpwidestring unit's init code
git-svn-id: branches/cpstrrtl@24913 -
* Build unixcp for all unix-like systems.
* Use the unixcp unit in cwstring instead of winiconv.inc.
- Deleted winiconv.inc
- Reverted r22410,r22411,r22428. The compiler will use the unixcp unit to get a default code page for ansistrings.
git-svn-id: trunk@23670 -
RTL units. Comes with a FPCRTL_FILESYSTEM_UTF8 define that can be
activated for targets whose single byte filesystem interface enforces
UTF-8; included in inc/systemh.inc and unix/cwstring.pp until now
+ DefaultFileSystemCodePage variable that holds the code page used for
communicating with the OS single byte file system APIs, and for the
strings returned by those same APIs. Initialized with
o the result of GetACP in the system unit of Windows platforms, except for
WinCE which uses UTF-8 since its file system OS API calls already use
the UTF-16 versions
o CP_UTF8 on Unix platforms with FPCRTL_FILESYSTEM_UTF8 defined, and with
DefaultSystemCodePage on other Unix platforms
o DefaultSystemCodePage on Java/Android JVM targets
+ DefaultRTLFileSystemCodePage variable that holds the code page used to
encode strings returned by RTL routines that return filenames obtained
from OS API calls. By default the same as DefaultFileSystemCodePage on
all platforms. Separate from DefaultFileSystemCodePage for clarity on
platforms that may use either utf-16 or single byte OS API calls to
send/receive file names (such as most Windows platforms)
+ new scpFileSystemSingleByte enum that can be passed to
GetStandardCodePage() to get the default code page for OS single byte file
system APIs, with implementations for Unix and Windows
+ SetMultiByteFileSystemCodePage() procedure to override the value of
DefaultFileSystemCodePage
In principle, in the long run unchanged programs only using generic
ansistrings and unicodestrings should (mostly) behave the same as in
FPC 2.6.0 as far as RTL-level file system APIs are concerned if
they set DefaultFileSystemCodePage and DefaultRTLFileSystemCodePage
to DefaultSystemCodePage at the start of their execution
git-svn-id: branches/cpstrrtl@22466 -
functions (except for TCGetPGrp, which behaves differently in Pascal
compared to the C version -- although that may be a bug in itself)
(mantis #21665)
git-svn-id: trunk@21295 -
o support for the new codepage-aware ansistrings in the jvm branch
o empty ansistrings are now always represented by a nil pointer rather than
by an empty string, because an empty string also has a code page which
can confuse code (although this will make ansistrings harder to use
in Java code)
o more string helpers code shared between the general and jvm rtl
o support for indexbyte/word in the jvm rtl (warning: first parameter
is an open array rather than an untyped parameter there, so
indexchar(pcharvar^,10,0) will be equivalent to
indexchar[pcharvar^],10,0) there, which is different from what is
intended; changing it to an untyped parameter wouldn't help though)
o default() support is not yet complete
o calling fpcres is currently broken due to limitations in
sysutils.executeprocess() regarding handling unix quoting and
the compiler using the same command lines for scripts and directly
calling external programs
o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
to the make command line
git-svn-id: branches/jvmbackend@20887 -