Support for Ascii compilation ends after the next LTS cycle

Developed or developing a new product in PureBasic? Tell the world about it.
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Support for Ascii compilation ends after the next LTS cy

Post by Little John »

mhs wrote:Windows uses UTF-16 internal for API calls, so I thought PB uses also UTF-16? Am I wrong?
[u]Fred[/u] wrote:For the record, PB uses UCS2 string encoding internally when unicode mode is ON (it doesn't support multibyte UTF16 encoding).
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Support for Ascii compilation ends after the next LTS cy

Post by wilbert »

Thorium wrote:Would be even better if PB would use UTF-16 internaly instead of UCS-2.
It would have the same problem you ran into with UTF-8 (making some string procedures more complicated and most likely slower).
It also would break existing forum code which uses pointers to unicode characters assuming a unicode character always takes up two bytes.
Windows (x64)
Raspberry Pi OS (Arm64)
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: Support for Ascii compilation ends after the next LTS cy

Post by Thorium »

wilbert wrote:
Thorium wrote:Would be even better if PB would use UTF-16 internaly instead of UCS-2.
It would have the same problem you ran into with UTF-8 (making some string procedures more complicated and most likely slower).
It also would break existing forum code which uses pointers to unicode characters assuming a unicode character always takes up two bytes.
I know. The reason is WinAPI as mhs and Little John wrote. With UCS-2 there is not a 100% compatiblity to the WinAPI.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Support for Ascii compilation ends after the next LTS cy

Post by freak »

quidquid Latine dictum sit altum videtur
User avatar
gurj
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

Re: Support for Ascii compilation ends after the next LTS cy

Post by gurj »

hope:
1 add AsciiToUni(),UniToAscii(),...
2 string is data,isnot string
3 AsciiToUni(),UniToAscii(),...result immobile data
4 Strings functions no only for string,Example:
FindString() changeTo FindData(a.data,b.data,wordBeyes)
Flag:wordBeyes=1 or 2 or 3 or 4 or 5 or ...
use Strings functions,you must know your data Structure
==============
other Note:Unicode in win32.hlp[1997]
Example:

EM_SETSEL
Windows NT: Yes
Win95: Yes
Win32s: Yes
Import Library: -
Header File: winuser.h
Unicode: No
Platform Notes: None

EM_EXSETSEL
Windows NT: Yes
Win95: Yes
Win32s: No
Import Library: -
Header File: richedit.h
Unicode: No
Platform Notes: None
my pb for chinese:
http://ataorj.ys168.com
Post Reply