Maybe one of the top fellows will answer this.
When ASCII support is deprecated, does that mean that one will not be able to
read or write ASCII to or from files ?
If so, there may be a problem. I write specialized accounting applications
having to do with U.S. government billing such as Medicare and Medicaid.
The HIPAA 5010 required standard is ASCII for data files sent or received.
So am I out of luck ?
Thanks in advance.
ASCII Deprecation
Re: ASCII Deprecation
See blog post of freak: http://www.purebasic.fr/blog/?p=452
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
PB Last Final / Last Beta Testing
Re: ASCII Deprecation
The PB functions ReadString and WriteString both have optional format flags that let you specify the format (Ascii, UTF-8, Unicode) of the data to be read or written.ANDY ANDERSON wrote:When ASCII support is deprecated, does that mean that one will not be able to
read or write ASCII to or from files ?
Think Unicode!
Re: ASCII Deprecation
seeing as its nearly Christmas, is there a "Using Ascii strings from Unicode-compiled PB apps" guide?!? that would help make the Ascii->Unicode transition less scary 

-
- User
- Posts: 62
- Joined: Thu Aug 28, 2014 9:02 pm
Re: ASCII Deprecation
@ElementE
I am aware of the ReadString, WriteString and various file open commands with
the #PB_Ascii flag.
The question is whether this flag will be supported in the releases after ASCII
deprecation.
I am aware of the ReadString, WriteString and various file open commands with
the #PB_Ascii flag.
The question is whether this flag will be supported in the releases after ASCII
deprecation.
Re: ASCII Deprecation
Briefly, the deprecation is Ascii compile. Meaning, native strings will be Unicode.
The commands will still support the #PB_Ascii switch and there will be additional functions for ToAscii(), ToUni(), etc.
But, if you read file contents using #PB_Ascii switch and assign to a PB string variable, it will now be a Unicode string.
The commands will still support the #PB_Ascii switch and there will be additional functions for ToAscii(), ToUni(), etc.
But, if you read file contents using #PB_Ascii switch and assign to a PB string variable, it will now be a Unicode string.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: ASCII Deprecation
The flags will indeed continue to be supported. Fred's post:
http://www.purebasic.fr/english/viewtop ... 14&t=60171
http://www.purebasic.fr/english/viewtop ... 14&t=60171
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: ASCII Deprecation
As you can read in the blog post:
...
So we decided to remove the ability to compile in ascii mode in the PB version that follows after the next LTS version (that is, the LTS version coming after the 5.2x LTS cycle ends).
...
No changes will be made to the language or data types (The .c, .a and .u as well as the pseudo-types and library commands will remain as they are). The only difference is that the “compile in unicode mode” switch in the compiler will be permanently set to “on”.
...
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
PB Last Final / Last Beta Testing
-
- User
- Posts: 62
- Joined: Thu Aug 28, 2014 9:02 pm
Re: ASCII Deprecation
@skywalk, IdeasVacuum and helpy
Thanks, I feel better now. I'm 72 years old and plan to retire at 75.
So 64 bit ASCII will probably carry me through.
But if for some stupid reason, I decide to continue coding to senility,
the functions you mentioned will provide a work around when 128 bits
becomes the norm.
Thanks, again.
Thanks, I feel better now. I'm 72 years old and plan to retire at 75.
So 64 bit ASCII will probably carry me through.
But if for some stupid reason, I decide to continue coding to senility,
the functions you mentioned will provide a work around when 128 bits
becomes the norm.
Thanks, again.
Re: ASCII Deprecation
Fred gave the practical implications of the change when he wrote the following:
So if we get our programs all tested and working now in Unicode Mode, we should be safe.
- - Basically, if your software runs with the "unicode" swith ON, nothing will change, you can skip the following text
. If not, then you can enable it and test it.
- All strings in PB will be handled as UCS2 (16-bit) strings internally. So if you used "@String$" somewhere in your code, change are high it won't work anymore (if dealing which an API for example)
- We plan to provide 2 new functions, to ease things a bit:
*AsciiBuffer = ToAscii(String$)
*UTF8Buffer = ToUTF8(String$)
Think Unicode!