You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behaviour started some weeks before, I could not exactly figure out with which version of pry or pry-rails. It worked before with the same rails versions.
Setup
Debian 11 (bullseye)
ruby 2.7.4p191
Rails 6.1.4.1 (and Rails 6.0.3.2)
no ~/.pryrc
LANG=de_DE.UTF-8
Running rails new testenc and adding pry-rails to the Gemfile (see Gemfile.zip for Gemfile and Gemfile.lock)
Things I tested
Starting pry (without rails) works (and STDIN.external_encoding gives #<Encoding:UTF-8>)
Starting rails c without the pry-rails gem (irb console): unicode works.
Starting pry -r ./config/environment fails with unicode problems (as described)
Changing LANG
spring stop; LANG=C rails c: now typing ä or € or any other non-ASCII character shows no echo at all.
But: if spring is still running from before (i.e. without the spring stop) the LANG change has no effect.
No history
Starting pry gives me the history from last time. This also stopped working for pry rails (the history file is not loaded), at the same time (can file a separate issue for this but could also be related).
The text was updated successfully, but these errors were encountered:
Problem
With
pry-rails
in the Gemfile startingrails c
(orbundle exec rails c
) gives a pry console.Typing some unicode character (outside the ASCII range) show incorrect results (i.e. the byte sequence) on the console:
ä
→ä
,é
→é
,€
→â¬
,™
→â¢
,…
STDIN.external_encoding
givesnil
This behaviour started some weeks before, I could not exactly figure out with which version of pry or pry-rails. It worked before with the same rails versions.
Setup
~/.pryrc
LANG=de_DE.UTF-8
Running
rails new testenc
and addingpry-rails
to the Gemfile (see Gemfile.zip forGemfile
andGemfile.lock
)Things I tested
pry
(without rails) works (andSTDIN.external_encoding
gives#<Encoding:UTF-8>
)rails c
without thepry-rails
gem (irb console): unicode works.pry -r ./config/environment
fails with unicode problems (as described)Changing
LANG
spring stop; LANG=C rails c
: now typingä
or€
or any other non-ASCII character shows no echo at all.But: if spring is still running from before (i.e. without the
spring stop
) theLANG
change has no effect.No history
Starting
pry
gives me the history from last time. This also stopped working for pry rails (the history file is not loaded), at the same time (can file a separate issue for this but could also be related).The text was updated successfully, but these errors were encountered: