- Unicode strings

From: [at]} <Gérard>
Date: Fri, 14 Oct 2005 01:05:33 +0200

----boundary-LibPST-iamunique-2019386625_-_-
Content-type: text/plain

Hello,

I have a problem with unicode strings. In the language reference
(section 6.6), it is said:

Constant strings which consist solely of characters in the range
0X..0FFX and strings stored in an array of SHORTCHAR are of type
Shortstring, all others are of type String.

The problem is that it is impossible to create a constant string whose
characters are outside the range 0X..0FFX. The compiler procedure that
reads constant strings (DevCPS.Str) uses SHORTCHARs instead of CHARs
and, so, is unable to fulfil the requirements of the language reference
(see an example below).
It's a severe limitation to the use of unicode strings in BB. Questions:

- Has anyone been able to use unicode with BB?

- Would it be difficult to modify the compiler, so that a real use of
unicode becomes possible?

Cheers.

Grard

MODULE PrivUnicode;

IMPORT

TextModels, TextMappers, TextViews, Views;

PROCEDURE Do*;

VAR

s: ARRAY 32 OF CHAR;
t: TextModels.Model;
f: TextMappers.Formatter;

BEGIN (*Do*)
s[0] := 391X;
s[1] := 392X;
s[2] := 393X;
s[3] := 394X;
s[4] := 395X;
s[5] := 0X;
t := TextModels.dir.New();
f.ConnectTo(t);
f.WriteString(s);
f.WriteLn;
f.WriteString("??G??");
f.WriteLn;
Views.OpenView(TextViews.dir.New(t));
END Do;

END PrivUnicode.

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



----boundary-LibPST-iamunique-2019386625_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fQ0Ke1xmNFxmc3dpc3NcZmNoYXJzZXQxNjEgQ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
XCdjNSIpO1xodG1scnRmXGYwfVxodG1scnRmMCBccGFyDQpmLldyaXRlTG47XHBhcg0KVmlld3Mu
T3BlblZpZXcoVGV4dFZpZXdzLmRpci5OZXcodCkpO1xwYXINCkVORCBEbztccGFyDQpccGFyDQpF
TkQgUHJpdlVuaWNvZGUuXHBhcg0KXHBhcg0KLS0tIEJsYWNrQm94XHBhcg0KLS0tIHNlbmQgc3Vi
amVjdCBIRUxQIG9yIFVOU1VCU0NSSUJFIHRvIGJsYWNrYm94QG9iZXJvbi5jaH19AGhZbXg1CklI
ZGw

----boundary-LibPST-iamunique-2019386625_-_---
Received on Fri Oct 14 2005 - 01:05:33 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:08 UTC