mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 06:49:27 +02:00
Use USE_INTERNAL_UNICODE to be able to test fpwidestrings on different targets
git-svn-id: trunk@38756 -
This commit is contained in:
parent
bbc364b245
commit
95e609cc56
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 }
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user