flat assembler
Message board for the users of flat assembler.

Index > Windows > Include files stated as ASCII (should be ANSI?)

Author
Thread Post new topic Reply to topic
FlierMate



Joined: 21 Jan 2021
Posts: 219
FlierMate 09 Apr 2021, 19:42
I suppose A in Win32A.inc stands for ANSI and not ASCII. (W in Win32W.inc stands for Wide-char)

I took one example from MS Docs:

Quote:
ReadConsole reads keyboard input from a console's input buffer. It behaves like the ReadFile function, except that it can read in either Unicode (wide-character) or ANSI mode.


Currently in Win32Axxx.inc beginning remarks stating:
Quote:
; Win32 programming headers (ASCII)


This is not big deal, but ANSI should be the correct term? (Correct me if I am wrong)

BTW, where do I look for 80386.inc? Thank you so much, Tomasz, for the hard work. I am now studying your tutorial "Learning binary file formats (work in progress)".[/b]
Post 09 Apr 2021, 19:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20290
Location: In your JS exploiting you and your system
revolution 09 Apr 2021, 20:13
The Windows docs are also wrong. Unicode it not wide-char.

In fact Unicode doesn't specify any encoding, it is just character codes with no notion of how to encode them in ASCII, ANSI, UTF-8, or anything.
Post 09 Apr 2021, 20:13
View user's profile Send private message Visit poster's website Reply with quote
FlierMate



Joined: 21 Jan 2021
Posts: 219
FlierMate 09 Apr 2021, 20:51
revolution wrote:
The Windows docs are also wrong. Unicode it not wide-char.

In fact Unicode doesn't specify any encoding, it is just character codes with no notion of how to encode them in ASCII, ANSI, UTF-8, or anything.


You're right, I looked up its definition in the reports, Unicode can have narrow characters as well (not just wide characters).
Post 09 Apr 2021, 20:51
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20290
Location: In your JS exploiting you and your system
revolution 10 Apr 2021, 05:55
That is a different meaning of narrow/wide.

Windows uses wide-char to mean using two bytes per character (and sometimes four with the surrogate pairs).

Unicode uses narrow/wide to describe the visual representation of the glyph and the spacing to the next character.
Post 10 Apr 2021, 05:55
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2493
Furs 10 Apr 2021, 14:02
UTF-16 was a mistake. Microsoft really fucked up and should've used UTF-8 like the rest of the world.
Post 10 Apr 2021, 14:02
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4016
Location: vpcmpistri
bitRAKE 10 Apr 2021, 14:33
Furs wrote:
UTF-16 was a mistake. Microsoft really fucked up and should've used UTF-8 like the rest of the world.
Quoting this just because it can't be stated enough. Windows should boot up with an apology to programmers until they convert all the APIs to UTF-8 and make UTF-16 an option for legacy support.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 10 Apr 2021, 14:33
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20290
Location: In your JS exploiting you and your system
revolution 10 Apr 2021, 14:37
Furs wrote:
UTF-16 was a mistake.
It's even worse when you add UCS-2 file names into the mix.

"Consistency? What's that?"
Post 10 Apr 2021, 14:37
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 11 Apr 2021, 11:43
Furs wrote:
UTF-16 was a mistake. Microsoft really fucked up and should've used UTF-8 like the rest of the world.

Oh, yeah, Microsoft should really be sorry for being nearly the first to adopt Unicode standard and to follow the Unicode Consortium recommendations.

Who cares about the Consortium changing their minds 5 years later when Win32s, Windows NT 3.1, Windows NT 3.5, Windows NT 3.51 and Windows 95 had already been shipped thus making it nearly impossible to move to UTF-8 without breaking software written by other guys who also wanted to adopt Unicode as fast as possible.

They (Microsoft) should have let Linux guys be the first ones and get blamed. Oh, sorry, something makes me think that we would still use and love UTF-16 in that case, and Microsoft would be blamed for being slow to adopt Unicode. After all, it’s mostly politics.
Post 11 Apr 2021, 11:43
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.