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

Non-ASCII characters get scrambled #18

Open
DizzyHSlightlyVoided opened this issue Dec 22, 2016 · 3 comments
Open

Non-ASCII characters get scrambled #18

DizzyHSlightlyVoided opened this issue Dec 22, 2016 · 3 comments

Comments

@DizzyHSlightlyVoided
Copy link

Unicode characters get scrambled when loaded through Twee2. For example, the back/forward arrows in the latest version of Sugarcube look like this:

sugarcubeerrorscorrect

Whereas if a story is compiled in Twee2, they look like this:

sugarcubeerrorstwee2

Also, if a file contains UTF-8 byte-order marks, Twee2 seems to interpret them as literal ASCII characters, in includes and elsewhere.

@emmeken
Copy link

emmeken commented Aug 30, 2017

The problem seems to be that Ruby's default encodings can be unexpected. The default encoding used for text files depends on system settings, so it might work fine for some people and be broken for others.

I think it would be good to use UTF-8 as the default encoding for text files, possibly with an override option on the command line.

A workaround would be to invoke Ruby with the --external-encoding=UTF-8 option.

@mcdemarco
Copy link
Contributor

Some more details are mentioned in #21.

@NQNStudios
Copy link

This is happening to me, and mangling Spanish words in a bilingual game I'm making:

image

I see fixes and workarounds in the discussion on #21 but I feel like it should work out of the box.

I'm running twee2 on Windows 10.

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

No branches or pull requests

4 participants