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

ASCII only mode #102

Closed
ryanfelder opened this issue May 31, 2018 · 9 comments
Closed

ASCII only mode #102

ryanfelder opened this issue May 31, 2018 · 9 comments
Labels
💪 improvement "Where we're going, we don't need roads."

Comments

@ryanfelder
Copy link

I have a 1979 VT100 sitting on my desk. I set my terminal emulation to $TERM=vt100
Unfortunately, it seems the characters used for drawing the boxes in wtf are not supported by this encoding.

It would be great if I could define 7-bit or 8-bit only mode, such as I can often do with aa libs.

20180531_160915

@senorprogrammer
Copy link
Collaborator

Whoa. Nice! This might be my favourite bug report/feature request I've ever received. No promises, but I'll definitely keep it in mind; just need to find my dad's old Osborne 1 first....

@senorprogrammer senorprogrammer added 💪 improvement "Where we're going, we don't need roads." low labels May 31, 2018
@AaronOmanLendesk
Copy link

@ryanfelder rocks! :-)

@senorprogrammer
Copy link
Collaborator

senorprogrammer commented Jun 1, 2018

Closing this request because I'll never get around to looking into this. If someone opens a PR that adds this compatibility, I'll happily merge it in.

@ryanfelder
Copy link
Author

Ouch, from 'favourite bug report/feature request' ever to 'won't fix' in 8 hours?

It seems like tcell supports converting between character sets natively, but I'm not a go programmer so a pull request is going to have a high barrier of entry for me.

"Internally Tcell uses UTF-8, just like Go. However, Tcell understands how to convert to and from other character sets, using the capabilities of the golang.org/x/text/encoding packages."
https://github.com/gdamore/tcell
https://github.com/gdamore/tcell/blob/master/encoding.go

It's your project so it's your call, but I doubt I'll be the last one to ask for ascii support on a text mode application.

@senorprogrammer
Copy link
Collaborator

All excellent points. I think I was too hasty. I'll reopen. Thanks for checking back in and doing the research, it's appreciated.

@ryanfelder
Copy link
Author

Thank you very much!

This could be a much more useful screensaver than what I currently use.

20180601_105311

@gdamore
Copy link

gdamore commented Jul 18, 2018

Tcell can do more of this, as it understands fallback characters as well, but the application needs to define fallbacks for unusual characters. (We should try to use the ALT character set if your terminal supports it, to get access to box drawing glyphs that way. The vt100 database does have entries for the ACS characters but I think only a few of them are present.)

In the Tcell package, the _demos/mouse.go program can be run with TERM set appropriately to check this. A real VT100 will get box characters. To compare what it looks like when you don't have that, try running with TERM=aixterm. (NOTE: You will have to set your locale via LC_ALL or somesuch to a 7 bit locale, e.g. "C".)

@rfeldercyc
Copy link

Turns out that by setting

export LC_ALL=C
export LC_CTYPE=C
export LANG=C

tcell's internal fallback seems to just work!

wtf_works

I think this issue can now be closed.

@senorprogrammer
Copy link
Collaborator

senorprogrammer commented Aug 27, 2019

This is amazing, well done. I love it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 improvement "Where we're going, we don't need roads."
Development

No branches or pull requests

5 participants