environment variables are set
* if no LC_*/LANG environment variables are set, let cwstring fall back to
unixcp.GetSystemCodePage
o this is mainly to avoid problems on OS X, where under certain
circumstances these variables are not set for GUI programs and
as a result we set the system code page to ASCII
git-svn-id: trunk@29257 -
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 -
o AIX-specific codepage names
o AIX/ppc32 uses a 16 bit wchar_t
o special support for handling cp866 on AIX: AIX only supports converting
cp866 from/to ISO8859-5 -> always use that code page as an intermediate
one on AIX (it's lossy, but better than completely failing)
* in case the default system code page cannot be detected, fall back to
UTF-8
git-svn-id: trunk@20839 -
- replace ifndef ver2_4 with ifdef FPC_HAS_CPSTRING for places with TextRec.CodePage access
- convert codepages for Read and Write text file operations
git-svn-id: trunk@19545 -
This change is required since CodePage to CodePage name conversions are required in other parts of RTL. Moreover those codepage identifiers are windows codepage identifiers and thus must be compatible with codepage identifiers used by delphi.
git-svn-id: trunk@19330 -