pierre
7d82ed4459
+ Add ACCEPT_646 for systems that return '646' for nl_langinfo(CODESET) call
...
git-svn-id: trunk@20905 -
2012-04-17 15:28:28 +00:00
Jonas Maebe
f0b7ce8afe
* fix building for Haiku/BeOS after r20839 (patch by Olivier Coursière)
...
git-svn-id: trunk@20878 -
2012-04-14 20:36:02 +00:00
Jonas Maebe
1e9b92ee50
+ AIX support for cwstring
...
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 -
2012-04-11 18:06:22 +00:00
Jonas Maebe
2c1f98320f
* disable implicit exception frames, no exceptions are raised by this unit
...
git-svn-id: trunk@20838 -
2012-04-11 18:06:18 +00:00
Jonas Maebe
8d8fc0fdee
+ RTL for AIX
...
git-svn-id: trunk@20786 -
2012-04-11 17:59:49 +00:00
Jonas Maebe
d3004d2bf6
* use same defaults for iPhoneSimulator as for iOS (UTF-8 etc, newer
...
iPhoneSimulator platforms no longer inherit the Mac OS X settings)
git-svn-id: trunk@20653 -
2012-03-29 17:13:29 +00:00
pierre
ff5d25174a
* Fix wide string shared library loading by adding 'lib' prefix if needed
...
git-svn-id: trunk@20568 -
2012-03-22 09:02:07 +00:00
pierre
24d100d164
NetBSD CODESET and LC_ALL added
...
git-svn-id: trunk@20337 -
2012-02-13 16:43:45 +00:00
sergei
e94508d5eb
* Improved utf16 to ucs4 conversion routines: removed function call on every character, allocate memory once and made as much as possible code shared between WideString and UnicodeString versions.
...
git-svn-id: trunk@20269 -
2012-02-06 17:55:06 +00:00
sergei
c862aec17c
* cwstring.pp, Wide2AnsiMove: moved SetCodePage to the end, so it comes after the last SetLength. Necessary after r20209, because SetLength has been modified to always set the code page of its argument. Here it sets code page of 'dest' to CP_NONE, because dest is RawByteString.
...
(Before r20209, SetLength was preserving code page when the string was resized in place and had refcount=1)
git-svn-id: trunk@20214 -
2012-02-01 21:08:13 +00:00
Jonas Maebe
eb680bcc5b
* don't try to set the iconv transliterate property in case the iconv
...
encoder was not successfully initialised
git-svn-id: trunk@19965 -
2012-01-04 16:08:15 +00:00
Jonas Maebe
f287cf3f61
* default to UTF-8 as system code page in case nl_langinfo(CODESET) returns
...
an empty string
git-svn-id: trunk@19964 -
2012-01-04 16:06:27 +00:00
paul
b7185a554c
rtl:
...
- 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 -
2011-10-25 08:40:49 +00:00
paul
e08c68f308
rtl: set codepages for TextRec field when Text file is opened + update this field for standard IO files when cwstring is used
...
git-svn-id: trunk@19543 -
2011-10-25 06:27:54 +00:00
paul
270fb09e87
rtl: add WideStringManager.GetStandardCodePageProc method to retrieve system ansi and console code pages
...
git-svn-id: trunk@19539 -
2011-10-25 01:39:11 +00:00
paul
3e29f0b179
rtl: make cwstring.pp dependent of dynlibs, load iconvctl dynamically
...
git-svn-id: trunk@19538 -
2011-10-25 01:25:23 +00:00
Jonas Maebe
01b980a462
* added "inc" extension to {$i winiconv}
...
git-svn-id: trunk@19529 -
2011-10-22 08:59:07 +00:00
Jonas Maebe
2b63a7d66f
* fixed compilation on darwin/arm after r19522
...
* replaced defined(arm) with defined(cpuarm) checks (cleaner)
git-svn-id: trunk@19528 -
2011-10-22 08:40:37 +00:00
paul
5d7d143300
rtl: transliterate characters if possible intead of replacing them with "?" chars while converting between codepages
...
git-svn-id: trunk@19522 -
2011-10-21 03:23:23 +00:00
pierre
dbd3df9ddf
+ Added OpenBSD CODESET and LC_ALL values
...
git-svn-id: trunk@19369 -
2011-10-04 22:20:41 +00:00
paul
6384fa2a19
rtl: revert r19330. We probably need to create a separate encoding<->codepage table.
...
git-svn-id: trunk@19332 -
2011-10-03 10:28:14 +00:00
paul
a0e7196ae9
rtl: move winiconv.inc into general inc directory and rename it to wincodepages.inc, also rename win2iconv, iconv2win to CodePageToCodePageName, CodePageNameToCodePage.
...
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 -
2011-10-03 03:35:45 +00:00
Jonas Maebe
591230104b
* prevent the internal windows code page number -> iconv name and vice versa
...
conversion routines from resulting in any code page conversions themselves
git-svn-id: trunk@19320 -
2011-10-01 23:26:12 +00:00
Jonas Maebe
7dd5811828
+ support for transcoding the new ansistring type on unix platforms
...
* initialize DefaultSystemCodePage on unix platforms
git-svn-id: trunk@19194 -
2011-09-23 17:32:18 +00:00
paul
528f7fbb06
rtl: manual merge some cpstrnew changes which was impossible to merge using regular tools due to the merge conflicts
...
git-svn-id: trunk@19137 -
2011-09-18 01:40:56 +00:00
paul
091627883f
merge r14347 from cpstrnew branch by florian:
...
* fixed bootstrapping with 2.4.0
* patches by Graeme Geldenhuys, resolve #15251 , #15252 , #15253
git-svn-id: trunk@19102 -
2011-09-17 12:00:06 +00:00
Jonas Maebe
a2e8134b7c
* part of r16533, forgot to commit
...
* also fixes CharLengthPChar() for non-BeOS by initialising the mbstate
parameter passed to mbrlen() to 0 (otherwise its contents are interpreted
as already valid, containing information about the current shiftstate etc)
git-svn-id: trunk@16552 -
2010-12-11 18:08:16 +00:00
Jonas Maebe
c4488f6b3a
* hook up CompareUnicodeStringProc and CompareTextUnicodeStringProc in
...
cwstring (fixes webtbs/tw17591.pp on unix platforms)
* enhanced webtbs/tw17591.pp so it also (superficially) checks the
correctness of the called routines, and add cwstring for unix platforms
git-svn-id: trunk@16298 -
2010-11-03 12:16:20 +00:00
Jonas Maebe
194855eee0
* de-tabbed
...
git-svn-id: trunk@15419 -
2010-06-13 11:44:33 +00:00
Jonas Maebe
3ea3a41d2a
o patch from Olivier for Haiku libiconv functionality (mantis #15906 ):
...
* Haiku's nl_langinfo implementation is now used under Haiku instead of
the BeOS stub.
* Fix linking to iconv in the iconvenc package. The prefix has change
since the previous Haiku's version.
git-svn-id: trunk@14995 -
2010-03-09 09:58:14 +00:00
florian
a3884c4e49
* fixes bootstrapping with 2.2.x
...
git-svn-id: trunk@14355 -
2009-12-07 20:16:31 +00:00
pierre
90ddd046bc
* Use default functions if call to iconv_open failed
...
git-svn-id: trunk@14352 -
2009-12-07 16:57:12 +00:00
Jonas Maebe
afab9fb99c
* force utf-8 on iPhoneOS, because locale settings are absent/ignored there
...
git-svn-id: trunk@13066 -
2009-05-01 09:19:53 +00:00
Jonas Maebe
4771ca3ce1
* import iconv functions as libiconv_* instead of as iconv_* for ppc32
...
for Mac OS X 10.3 compatibility
git-svn-id: trunk@13035 -
2009-04-25 09:34:11 +00:00
florian
c127154efa
o Haiku patches by Olivier Coursiere
...
+ add posix thread support
* improve signal handling
* synchronize haiku's baseunix unit with the unix one (maybe it will be possible to remove Haiku's one in a future patch, but i keep it for now)
+ add support for standard sockets
* fix some functions import to use the right libraries under Haiku
* fix packages compilation
git-svn-id: trunk@12636 -
2009-02-01 10:30:55 +00:00
florian
b178b08ba7
Merged revisions 11665-11738 via svnmerge from
...
http://svn.freepascal.org/svn/fpc/branches/unicodestring
........
r11665 | florian | 2008-08-30 13:30:17 +0200 (Sat, 30 Aug 2008) | 1 line
* continued to work on unicodestring type support
........
r11666 | florian | 2008-08-30 19:02:26 +0200 (Sat, 30 Aug 2008) | 2 lines
* expectloc for wide/ansi/unicode strings is LOC_CONSTANT or LOC_REGISTER now
........
r11667 | florian | 2008-08-30 20:42:37 +0200 (Sat, 30 Aug 2008) | 1 line
* more unicodestring stuff fixed, test results on win32 are already good
........
r11670 | florian | 2008-08-30 23:21:48 +0200 (Sat, 30 Aug 2008) | 2 lines
* first fixes for unix bootstrapping
........
r11683 | ivost | 2008-09-01 12:46:39 +0200 (Mon, 01 Sep 2008) | 2 lines
* fixed 64bit bug in iconvenc.pas
........
r11689 | florian | 2008-09-01 23:12:34 +0200 (Mon, 01 Sep 2008) | 1 line
* fixed several errors when building on unix
........
r11694 | florian | 2008-09-03 20:32:43 +0200 (Wed, 03 Sep 2008) | 1 line
* fixed unix compilation
........
r11695 | florian | 2008-09-03 21:01:04 +0200 (Wed, 03 Sep 2008) | 1 line
* bootstrapping fix
........
r11696 | florian | 2008-09-03 21:07:18 +0200 (Wed, 03 Sep 2008) | 1 line
* more bootstrapping fixed
........
r11698 | florian | 2008-09-03 22:47:54 +0200 (Wed, 03 Sep 2008) | 1 line
+ two missing compiler procs exported
........
r11701 | florian | 2008-09-04 16:42:34 +0200 (Thu, 04 Sep 2008) | 2 lines
+ lazarus project for the linux rtl
........
r11702 | florian | 2008-09-04 16:43:27 +0200 (Thu, 04 Sep 2008) | 2 lines
+ set unicode string procedures
........
r11707 | florian | 2008-09-04 23:23:02 +0200 (Thu, 04 Sep 2008) | 2 lines
* fixed several type casting stuff
........
r11712 | florian | 2008-09-05 22:46:03 +0200 (Fri, 05 Sep 2008) | 1 line
* fixed unicodestring compilation on windows after recent unix changes
........
r11713 | florian | 2008-09-05 23:35:12 +0200 (Fri, 05 Sep 2008) | 1 line
+ UnicodeString support for Variants
........
r11715 | florian | 2008-09-06 20:59:54 +0200 (Sat, 06 Sep 2008) | 1 line
* patch by Martin Schreiber for UnicodeString streaming
........
r11716 | florian | 2008-09-06 22:22:55 +0200 (Sat, 06 Sep 2008) | 2 lines
* fixed test
........
r11717 | florian | 2008-09-07 10:25:51 +0200 (Sun, 07 Sep 2008) | 1 line
* fixed typo when converting tunicodestring to punicodechar
........
r11718 | florian | 2008-09-07 11:29:52 +0200 (Sun, 07 Sep 2008) | 3 lines
* fixed writing of UnicodeString properties
* moved some helper routines to unicode headers
........
r11734 | florian | 2008-09-09 22:38:55 +0200 (Tue, 09 Sep 2008) | 1 line
* fixed bootstrapping
........
r11735 | florian | 2008-09-10 11:25:28 +0200 (Wed, 10 Sep 2008) | 2 lines
* first fixes for persisten unicodestrings
........
r11736 | florian | 2008-09-10 14:31:00 +0200 (Wed, 10 Sep 2008) | 3 lines
Initialized merge tracking via "svnmerge" with revisions "1-11663" from
http://svn.freepascal.org/svn/fpc/trunk
........
r11737 | florian | 2008-09-10 21:06:57 +0200 (Wed, 10 Sep 2008) | 3 lines
* fixed unicodestring <-> variant handling
* fixed unicodestring property reading
........
git-svn-id: trunk@11739 -
2008-09-10 20:14:31 +00:00
florian
35c0f78642
+ Haiku support by Olivier Coursière based on old BeOS support
...
git-svn-id: trunk@11014 -
2008-05-19 17:33:35 +00:00
florian
213dd11800
* setlength in utf16/widestringtoutf32 fixed, resolves #10462
...
git-svn-id: trunk@9517 -
2007-12-22 18:43:29 +00:00
Jonas Maebe
2ffc310ebb
* fixed AnsiStrLComp and AnsiStrLIComp: they also have to ignore
...
embedded #0 's apparently + adapted test
git-svn-id: trunk@9471 -
2007-12-16 10:41:18 +00:00
Jonas Maebe
8536e35e44
* fixed indentation of LowerAnsiString/UpperAnsiString
...
git-svn-id: trunk@9444 -
2007-12-13 21:01:17 +00:00
Jonas Maebe
19985965e6
* fixed AnsiStrLower/AnsiStrUpper (were exchanged)
...
git-svn-id: trunk@9441 -
2007-12-13 20:49:52 +00:00
Jonas Maebe
60ccf03a0b
* completed cwstring unit
...
* optimized LowerWideString/UpperWideString not to call UniqueString
for each string character
* fixed LowerAnsiString/UpperAnsiString in case an ascii character
has a lower/uppercase version with a different length than 1
+ generic test for ansistring comparisons using on the widestring
manager (based on glibc test)
- removed ansi2ucs4-related stuff as it's not used/needed
git-svn-id: trunk@9440 -
2007-12-13 20:41:31 +00:00
Jonas Maebe
7ec9dc5bc9
* fixed unix CompareWideString to not treat null characters inside
...
a widestring as end-of-string + test (which fails on Darwin/FreeBSD
in utf-8/utf-16 locales, because their libc's wcscoll is documented
as only working in single-byte locales and falling back to wcscmp
for others)
git-svn-id: trunk@9416 -
2007-12-08 16:00:09 +00:00
Jonas Maebe
8b8ee03c32
* fixed BeOS compilation (patch from Olivier Coursiere)
...
git-svn-id: trunk@9398 -
2007-12-06 08:08:17 +00:00
Jonas Maebe
02c714aec1
* characters <= 127, not just < 127, can be concatenated to an
...
ansistring without conversion
git-svn-id: trunk@9395 -
2007-12-05 18:48:54 +00:00
Jonas Maebe
a180fdcc74
- removed commented out implementation of Upper/LowerWideString which
...
takes into account surrogate pairs (not needed, since upper/lower
case characters never need surrogate pairs)
git-svn-id: trunk@9394 -
2007-12-05 17:44:34 +00:00
Jonas Maebe
68595c8b72
* fixed wchar_t type (was: widechar, now is cint/cint32/long depending on
...
platform)
+ mbstate_t type for all unixes except BeOS (doesn't exist for BeOS)
+ implemented UpperAnsiStringProc/LowerAnsiStringProc for unix
* fixed Ansi2UCS4Move in cwstring (although it isn't used anywhere
currently)
+ test for Upper/LowerAnsiString
git-svn-id: trunk@9393 -
2007-12-05 17:42:35 +00:00
Jonas Maebe
4d254e4de8
* import iconv routines as iconv_* rather than libiconv_* for darwin
...
as the 32 bit libraries export both variants, but the new 64 bit
ones on Mac OS X 10.5 only export iconv_*
git-svn-id: trunk@9184 -
2007-11-10 21:12:45 +00:00
florian
7f4c387841
o new BeOS patch by Olivier Coursiere:
...
* correctly define the stack size for BeOS,
+ implement a minimum nl_langinfo function to correctly initialize WideString support
+ add fgl unit in the BeOS RTL makefile
* SysOSAlloc now return nil when the system can not allocate the asked memory,
* HAS_SYSOSFREE is no more defined with an empty implementation under BeOS. This was preventing FPC to reuse memory.
+ there is now a basic implementation of CheckPointer under BeOS.
git-svn-id: trunk@8994 -
2007-10-29 19:00:32 +00:00
florian
bcd5fc555a
* rtl part of Olivier Coursier's BeOS patch
...
git-svn-id: trunk@8396 -
2007-09-07 19:25:05 +00:00