PureBasic Forum
https://www.purebasic.fr/english/

Support for Ascii compilation ends after the next LTS cycle
https://www.purebasic.fr/english/viewtopic.php?f=14&t=60214
Page 7 of 7

Author:  Little John [ Wed Nov 04, 2015 5:35 pm ]
Post subject:  Re: Support for Ascii compilation ends after the next LTS cy

mhs wrote:
Windows uses UTF-16 internal for API calls, so I thought PB uses also UTF-16? Am I wrong?

Fred wrote:
For the record, PB uses UCS2 string encoding internally when unicode mode is ON (it doesn't support multibyte UTF16 encoding).

Author:  wilbert [ Wed Nov 04, 2015 5:47 pm ]
Post subject:  Re: Support for Ascii compilation ends after the next LTS cy

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.

Author:  Thorium [ Wed Nov 04, 2015 6:32 pm ]
Post subject:  Re: Support for Ascii compilation ends after the next LTS cy

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.

Author:  freak [ Wed Nov 04, 2015 6:52 pm ]
Post subject:  Re: Support for Ascii compilation ends after the next LTS cy

See here: viewtopic.php?p=471353#p471353

Author:  gurj [ Sun Apr 24, 2016 3:05 am ]
Post subject:  Re: Support for Ascii compilation ends after the next LTS cy

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

Page 7 of 7 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/