deadpixi / sam

An updated version of the sam text editor.
Other
436 stars 47 forks source link

Opening a file containing unicode remotely crashes samterm #70

Closed ckeen closed 6 years ago

ckeen commented 6 years ago

I have an OpenBSD machine where I open a file via sam -r obsdmachine test.txt As soon as I paste unicode into the buffer samterm hangs and I cannot enter any text. The command window is dead as well as the context menus show parenthesised commands (cut) (paste) etc.

Opening a file with a unicode character also triggers this behaviour.

$ hexdump test.txt 0000000 a4c3 000a 0000003

2018-03-14-142202_1406x1422_scrot

Any hints on how to debug this?

erezschatz commented 6 years ago

I can't comment on the actual reason for the core dump, however, this issue can be resolved by adding AcceptEnv to the sshd_config on the remote machine for passing the local machine's locale settings to the remote (e.g. AcceptEnv LANG LC_CTYPE LC_ALL etc.)

ckeen commented 6 years ago

Indeed this does help! Thanks! Maybe we should put this in the documentation somewhere?

-- May you be peaceful, may you live in safety, may you be free from suffering, and may you live with ease.

deadpixi commented 6 years ago

My apologies for being MIA; personal life has intervened.

I'll update the documentation. I've got some stuff coming down the pike that might fix this as a side-effect too.

ckeen commented 6 years ago

Thanks!

Have you started working on cleaning up the wire protocol so a 64bit samterm can talk to a 32bit host sam and vice versa?

deadpixi commented 6 years ago

@ckeen Indeed. The protocol is switching to a pure text protocol, and also being completely documented. This is all building up to rewriting the terminal part (which is where 95% of bugs lie and feature requests originate).

The goal is to have a new terminal that more-or-less looks like classic samterm, but also to allow other terminals to be written (in GTK+, etc). One day @erezschatz won't have to write Hebrew backwards in sam. :)