Author |
Topic: Need help with ... Save as ANSI (Read 590 times) |
|
tsh73
Full Member
member is offline


Gender: 
Posts: 210
|
 |
Re: Need help with ... Save as ANSI
« Reply #6 on: Jan 16th, 2017, 6:55pm » |
|
Thanks for entertaining reading. (from the text) It really looks like coding in Windows and avoiding UTF-16 is akin to pissing against the wind. Also Quote:FAQ 1. Q: Are you a linuxer? Is this a concealed religious fight against Windows? |
|
Number one question. They did suspect something 'Nuff said.
|
| « Last Edit: Jan 16th, 2017, 6:58pm by tsh73 » |
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Need help with ... Save as ANSI
« Reply #7 on: Jan 16th, 2017, 8:17pm » |
|
on Jan 16th, 2017, 6:55pm, tsh73 wrote:| It really looks like coding in Windows and avoiding UTF-16 is akin to pissing against the wind. |
|
But how often do you (or anybody) actually use UTF-16 when coding for Windows? I'm willing to bet that actually you use UCS-2, i.e. you assume that every character can be represented as 16-bits (two bytes).
That is the problem with UTF-16; it's neither one thing nor the other. It doesn't have the advantage of UTF-32 (every character can be represented by the same-size code) or of UTF-8 (an efficient byte-stream identical to ANSI when only ASCII characters are used). UTF-16 has the disadvantages of both!
Anyway, UTF-8 has long since won the race. It's the only Unicode encoding used on the web. It's the only Unicode encoding used in emails. It's the encoding used in SDL2 and it's the Unicode encoding used by LBB.
Richard.
|
|
Logged
|
|
|
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: Need help with ... Save as ANSI
« Reply #8 on: Jan 17th, 2017, 09:38am » |
|
Thank you Richard for interact,
Quote:To answer the OP's question yes, you can use LBB's program editor to convert between ANSI and UTF-8 or vice-versa |
|
Unfortunately this way did not help (I know this way), it must be done by coding, the code open the file read it convert it then saving as a new file. At last attach the new file to a program built in WinPC to Run.
All this done by one LBB exe. I finished do the job with the help of first post of Anatoly, by adding Code:
... ... ...
... ... ...
d$ = d$ + c$
next
open "Speak2.txt" for output as #2
#2 d$
close #2
'speak the number
c$ = "Speak2.txt"
'print c$
b$ = "cscript.exe speak.vbs "; c$
run b$, hide
End
The response of Anatoly was just in time, I thank him very much. And I thank Richard very much for one file LBB exe.
Unfortunately about half an hoer from now, I will be off line for a month or so.
Regards, Sarmed
|
|
Logged
|
|
|
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: Need help with ... Save as ANSI
« Reply #9 on: Jan 17th, 2017, 09:45am » |
|
> Change the setting in the Options menu and save the text to a new file.
I was asked you to put a code which we can use it to control the check box via code. You refused, or you don't replay for that request.
Regards, Sarmed
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Need help with ... Save as ANSI
« Reply #10 on: Jan 17th, 2017, 11:43am » |
|
on Jan 17th, 2017, 09:45am, SarmedNafi wrote:| I asked you to put a code which we can use it to control the check box via code. You refused, or you don't replay for that request. |
|
I refer you to the Directives section of the Help file:
%options ansi This directive selects ANSI character encoding, overriding (and changing if necessary) the current selection in the Options menu; it should normally be inserted at or near the start of the program. Note that there must not be a space after the percent sign.
%options unicode This directive selects Unicode (UTF-8) character encoding, overriding (and changing if necessary) the current selection in the Options menu; it should normally be inserted at or near the start of the program. I do not think it is very fair to claim that I "refused" your request, when on the contrary the very feature you asked for was added in a subsequent release of LBB.
Richard.
|
|
Logged
|
|
|
|
|