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

Build fix for unknown char in minilua.h #1

Merged
merged 1 commit into from
Jun 23, 2024
Merged

Conversation

jagt
Copy link
Contributor

@jagt jagt commented Jun 22, 2024

Weird error on my box. This should've fixed it.

Thanks a ton for this, this is like exactly what I was expecting and it's even better :)

@jlaumon
Copy link
Owner

jlaumon commented Jun 22, 2024

Thanks for the PR!

Would it work to disable this warning only for LuaReader.cpp? (which includes minilua's implementation)

Otherwise that's fine as a workaround but it'd be nice to also do PR for minilua.

@jlaumon
Copy link
Owner

jlaumon commented Jun 22, 2024

If can post the exact warning you get I can also take a look at doing the PR for minilua

@jagt
Copy link
Contributor Author

jagt commented Jun 22, 2024

See below:

1>D:\Dev1\AssetCooker\thirdparty\minilua\minilua.h(28341,1): error C2220: the following warning is treated as an error (compiling source file src\LuaReader.cpp)
1>D:\Dev1\AssetCooker\thirdparty\minilua\minilua.h(28341,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file src\LuaReader.cpp)
1>D:\Dev1\AssetCooker\thirdparty\minilua\minilua.h(28341,1): error C2220: the following warning is treated as an error (compiling source file src\RuleReader.cpp)
1>D:\Dev1\AssetCooker\thirdparty\minilua\minilua.h(28341,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file src\RuleReader.cpp)

Also I messed up my branch, let me fix it

@jlaumon
Copy link
Owner

jlaumon commented Jun 22, 2024

I don't really understand why you get this warning. There is no weird character on line 28341 that I can see.

What happens if you try adding buildoptions { "/utf-8" } instead if the warning? (You can add it just after the disablewarnings block). That should make the compiler consider all files to be utf-8 instead of code page (936).

@jagt
Copy link
Contributor Author

jagt commented Jun 23, 2024

Actually it's pretty confusing to me. I suspect it's too long and the char is somewhere else.
I suspect that it's my windows is localized.

/utf-8 works for me. I've updated the commit. Thanks!

@jlaumon jlaumon merged commit e55583e into jlaumon:main Jun 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants