Use USE_INTERNAL_UNICODE to be able to test fpwidestrings on different targets

git-svn-id: trunk@38756 -
This commit is contained in:
pierre 2018-04-12 20:36:31 +00:00
parent bbc364b245
commit 95e609cc56
14 changed files with 234 additions and 125 deletions

View File

@ -3,19 +3,27 @@ program fpctest4;
{$mode delphi}
{$endif fpc}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
Classes,sysutils,variants,typinfo;
type

View File

@ -1,23 +1,28 @@
{$mode objfpc}{$H+}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifdef darwin}
iosxwstr,
{$else}
cwstring,
{$endif}
{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
Classes, SysUtils;

View File

@ -1,20 +1,35 @@
{$codepage cp866}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef unix}
uses
{$ifdef darwin}
iosxwstr
{$else}
cwstring
{$endif};
{$else def USE_INTERNAL_UNICODE}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet;
{$endif}
{$endif}
{$ifdef unix}
uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$endif}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
strings;
{$endif ndef USE_INTERNAL_UNICODE}
var
s: ansistring;
ws, ws3: widestring;

View File

@ -8,20 +8,28 @@ program test;
{$endif}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
Classes,SysUtils,uw13015;
procedure writefile(const fn: string);

View File

@ -1,20 +1,29 @@
{$mode objfpc}{$H+}
{$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
Classes, SysUtils;
function localUnicodeToUTF8(u: cardinal; Buf: PChar): integer;

View File

@ -2,21 +2,29 @@ program comparetext;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
sysutils
{$ifdef unix}
,{$ifdef darwin}iosxwstr{$else}cwstring{$endif}
{$endif}
;
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
sysutils;
var
int1: integer;
ustr1,ustr2: unicodestring;

View File

@ -2,23 +2,27 @@ program concatenate_resourestrings_delphiunicode;
{$mode delphiunicode}
{$codepage cp1250}
{$ifdef go32v2}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet;
{$define USE_CPALL_UNIT}
{$endif}
{$endif}
{$ifdef unix}
{$ifndef USE_INTERNAL_UNICODE}
uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$endif}
{$else USE_INTERNAL_UNICODE}a
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall;
{$endif}
{$endif def USE_FPWIDESTRING_UNIT}
resourcestring
res2 = 'žlu<6C>ouèký ' + 'koníèek';

View File

@ -1,19 +1,28 @@
program TestStrIComp;
{$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_INTERNAL_UNICODE}
{$endif}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef unix}{$ifdef darwin}iosxwstr{$else}cwstring{$endif},{$endif}
SysUtils;
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils;
var l: longint;
begin

View File

@ -2,17 +2,27 @@
{ Submitted by "Matthias Hryniszak" on 2005-02-26 }
{ e-mail: matthias@hryniszak.de }
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef unix}{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
SysUtils;
var

View File

@ -1,21 +1,28 @@
program tw4080;
{$i+}
{$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet;
{$endif}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef unix}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$endif unix}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
strings;
var
S, S2 : array [1..15] of char;

View File

@ -2,26 +2,30 @@ program av;
{$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef FPC}
{$ifdef unix}
{$ifdef unix}
cthreads,
{$ifdef darwin}
iosxwstr
{$else}
cwstring
{$endif}
,{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$endif}
{$endif unix}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
sysutils;
type
testrecty = record

View File

@ -1,19 +1,25 @@
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
{$codepage utf8}
uses
{$ifdef unix}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
sysutils;
const

View File

@ -1,19 +1,27 @@
{ %norun }
{$ifdef go32v2}
{$define use_fpwidestring_unit}
{$define use_unicodeducet_unit}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
sysutils;
{ just to make sure that no all wide->shortstring compile time conversions }

View File

@ -1,17 +1,25 @@
{$ifdef go32v2}
{$define USE_INTERNAL_UNICODE}
{$endif}
{$ifdef USE_INTERNAL_UNICODE}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$define USE_CPALL_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifndef USE_INTERNAL_UNICODE}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
{$endif ndef USE_INTERNAL_UNICODE}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{$endif}
{$ifdef USE_CPALL_UNIT}
cpall,
{$endif}
variants,sysutils;
var a:variant;
x,y: array of byte;