Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Treatment of "Two byte character" of character string

Author
Message
kuro
16
Years of Service
User Offline
Joined: 2nd Sep 2007
Location:
Posted: 3rd Sep 2007 03:47
I'm sorry, because it is a machine translation, sentences might be strange.

It is counted as two characters when it tries to treat "2ByteCharactor" by "LEFT$" and "RIGHT$" and the inconvenience is caused.

Are there DLL etc. that evade this?
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Sep 2007 06:39
Can you give us an example?

Not knowing exactly what the problem is, I can only suggest the use of Len() to check the length.

But as strings are made up of bytes, where does the 2 byte character come from?

TDK_Man

dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 3rd Sep 2007 06:54
I believe he means Unicode characters which I don't think DBP supports.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Sep 2007 15:36
He could also mean multi-byte characters - I don't know exactly how Lee implemented multi-language support in DBPro.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 4th Sep 2007 07:09
Lee used the ascii character set system, to keep it compatible with Windows 9x

Although that seems quite redundant now given 9.0c doesn't work on Windows 98, and Windows ME can use Unicode natively.
They really should've changed it from multi-byte to unicode a long time ago, as providing support for non-english languages is a pain without creating your own system for it.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Sep 2007 19:11
Too late!
Unicode isn't a switch - it needs major changes to existing code to implement, not just a compiler-flag change. There is so much code out there that assumes 8 bit (DBPro code, and plug-ins) that would break even if you did manage to switch over without breaking DBPro itself.

Basically, it was too late as soon as Lee started coding with the intention of allowing DBPro to run on Win9x platforms.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Oryaaaaa
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: Aichi-ken, Japan
Posted: 5th Sep 2007 16:43
Hi IamM, How are U?

Kuro said "have a Unicode", I think "LATE!!" too.
but
I dont develop unicode Applications by PB.

in Display procedure
Limit ASCII charctor code? (AtoZ). kuro says mean
"have a No Check charactors"

PureBasic No.3 JapaneseUser

Login to post a reply

Server time is: 2024-07-01 03:28:25
Your offset time is: 2024-07-01 03:28:25