Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assuming UTF-8 is not compatible with Quake 1 maps #1

Open
dsvensson opened this issue Oct 11, 2024 · 0 comments
Open

Assuming UTF-8 is not compatible with Quake 1 maps #1

dsvensson opened this issue Oct 11, 2024 · 0 comments

Comments

@dsvensson
Copy link

dsvensson commented Oct 11, 2024

Anything from worldspawn message (map name) to entity messages may be encoded in for example "red" text, so treating the .map file as UTF-8 is inherently invalid. It needs to be Vec<u8> and while entity key names are always valid ascii, the values are not. Ideally shalrath would consider property values as variable, and have some support for parsing origin, angles and other common fields in a structured manner.

qmap for examples deals with this by using CString for both key and value https://github.com/4LT/quake-util/blob/master/src/qmap/repr.rs#L152 which is by convention kind of useless as I think it's unheard of that keys would have weird chars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant