LB Booster
General >> General Board >> Is it just me? http://lbb.conforums.com/index.cgi?board=general&action=display&num=1328801910 Is it just me?
Post by James on Feb 9th, 2012, 2:38pm
Is it just me, or does LBB have a bit of Unicode capability?
I read a line in of Unicode, trim$() it, and it looked clean.
-------
1 Cor. 6:19 What? know ye not that your body is the temple of the Holy Ghost which is in you, which ye have of God, and ye are not your own?
Re: Is it just me?
Post by Richard Russell on Feb 9th, 2012, 3:05pm
Is it just me, or does LBB have a bit of Unicode capability?
No, it's ANSI, like LB. Because, in both LB and LBB, strings can contain anything there is no reason why you shouldn't store Unicode text (in either UTF-8 or UTF-16 encoding) in a string variable, but there's no native way of displaying it.
What exactly do you want to do?
Richard. Re: Is it just me?
Post by James on Feb 9th, 2012, 4:56pm
I would like to be able to read/write Korean, Chinese, Arabic, and Russian text files.
------
John 14:12) Verily, verily, I say unto you, He that believeth on me, the works that I do shall he do also; and greater [works] than these shall he do; because I go unto my Father.
Re: Is it just me?
Post by Richard Russell on Feb 9th, 2012, 9:27pm
I would like to be able to read/write Korean, Chinese, Arabic, and Russian text files.
There shouldn't be any problem with the files, or with string variables, as they can both contain Unicode text. If you want to make use of native functions like INSTR, STR$, VAL, WORD$ or WINSTRING then you will almost certainly need to use UTF-8 encoding rather than UTF-16.
The only real issue is actually displaying the text, since the native controls are ANSI only. You'd need to use the Windows API for that.
I certainly don't take the view that LB (or LBB) are unsuitable for Unicode applications, it just requires a little more effort.
Richard.
Re: Is it just me?
Post by Richard Russell on Feb 9th, 2012, 10:08pm
To avoid any misunderstanding, LBB does have some limited support for Unicode in the mainwin and when outputting to the printer using lprint, but that's all.
For example try this:
Code:
!@vdu.m.c& OR= &80
print "Это демонстрация российского текста, ";
print "это пишется слева направо."
(the strings are UTF-8, but displayed here as ANSI).