Skip to content
This repository was archived by the owner on Nov 13, 2018. It is now read-only.
This repository was archived by the owner on Nov 13, 2018. It is now read-only.

Migrate to narrow string usage only, on Windows #11

Description

@nicholatian

At present, ÔÇô has a mess of CPP conditionals everywhere that make the engine use “wide strings” for any text handling that ends up in console output, if compiling for Windows. This presents a few problems:

  • There is no way to fairly draw the line determining whether or not wide strings should be used, because there is no certainty that something may or may not end up printed to the console. The only way to fix this is to use wide strings everywhere, which isn’t always practical or efficient.
  • It makes a huge mess of things because of the inherent need for conditional compilation, which requires frequent usage of the C Preprocessor.
  • The only reason it does this at all in the first place is because I was unaware of a certain Windows API command which changes the console’s codepage to UTF-8; currently, it uses other API functions that instead change the console mode to use UTF-16, hence the wide string usage everywhere.

All other targeted platforms should be using narrow strings as it stands already, so this change is mostly concerning Windows-specific code. Let’s keep it simple and use UTF-8 everywhere.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions