diff --git a/rtl/unix/cwstring.pp b/rtl/unix/cwstring.pp index abf6383024..c6a5ec53a6 100644 --- a/rtl/unix/cwstring.pp +++ b/rtl/unix/cwstring.pp @@ -99,6 +99,7 @@ const _NL_CTYPE_CODESET_NAME = (_NL_CTYPE_CLASS)+14; CODESET = 0; // _NL_CTYPE_CODESET_NAME; {$elseif defined(solaris)} + {$define ACCEPT_646} CODESET=49; LC_ALL = 6; {$elseif defined(beos)} @@ -111,9 +112,11 @@ const {$endif} ESysEILSEQ = EILSEQ; {$elseif defined(OpenBSD)} + {$define ACCEPT_646} CODESET = 51; LC_ALL = 0; {$elseif defined(NetBSD)} + {$define ACCEPT_646} CODESET = 51; LC_ALL = 0; {$elseif defined(aix)} diff --git a/rtl/unix/winiconv.inc b/rtl/unix/winiconv.inc index 193fee679d..1146720a36 100644 --- a/rtl/unix/winiconv.inc +++ b/rtl/unix/winiconv.inc @@ -12,7 +12,8 @@ end; * http://msdn2.microsoft.com/en-us/library/ms776446.aspx *) const -win2iconv_arr: array[-1..406{$ifndef aix}-83{$endif}] of twin2iconv = +win2iconv_array_limit = 406{$ifndef aix}-83{$endif}{$ifdef ACCEPT_646}+1{$endif}; +win2iconv_arr: array[-1..win2iconv_array_limit] of twin2iconv = ((cp:0; name: 'UTF-8'), { invalid/unknown -> utf-8 } (cp:37; name:'IBM037'), (* IBM EBCDIC US-Canada *) (cp:37; name:'IBM-037'), (* IBM EBCDIC US-Canada, AIX *) @@ -342,6 +343,9 @@ win2iconv_arr: array[-1..406{$ifndef aix}-83{$endif}] of twin2iconv = {$endif} (cp:20127; name:'IBM367'), (cp:20127; name:'ISO-IR-6'), +{$ifdef ACCEPT_646} + (cp:20127; name:'646'), +{$endif ACCEPT_646} (cp:20127; name:'ISO646-US'), (cp:20127; name:'ISO_646.IRV:1991'), (cp:20127; name:'US'),