David Gorisek write:
> Hello,
Hi, thanks for your OmniBase and STS.
>
> how does one create a unicode character. Character class>>value: does
> not seem to allow integer values greater than 255.
>
> I don't see where the CharacterSet is initialized to make it support
> characters above 255.
>
> Best regards,
>
> David Gorisek
Dolphin doesn't support Unicode string perfectly, UnicodeString support
minimally.
IMHO, Unicode is very big deal in computer environment, so Dolphin must
adopt well-designed Unicode framework instead of
poor-instantly-designed current framework.
As my locale is Korean(2-byte, multi-byte characterset), I need
supporting on MBCS and Unicode grater than 255, so I have made some
method for extending UnicodeString class according of my needs
temporally.
Following codes may help you
"Make Unicode character from code-point:"
UnicodeString fromAddress: ((WORD fromInteger: codePoint) asByteArray
yourAddress)
"Get code-point of Unicode character:"
anUnicodeString asByteArray wordAtOffset: 0
And you should reimplement UnicodeString>>printOn: as following:
-----------------------
printOn: aStream
"Append the receiver as a quoted string to aStream just like a string
literal.
Internal quotes are doubled to produce a literal String.
N.B.: As Dolphin's UnicodeString doesn't support 2-byte character,
#printOn: occur
exception when the receiver contain 2-byte string. So receiver must be
converted to
normal String and deligate the printing job."
aStream
basicPrint: self;
nextPut: $(;
print: self copy asString;
nextPut: $); flush.
-----------------------
I'll make new framework like Delphi's WideString framework.
Until this job is complete, you may temproraly use above solutions.
Best Regards.
ChanHong Kim.