-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Locale is not properly set in the docker container
/__w/workspace/workspace/workspaceOS/.bundle/ruby/3.2.0/gems/json-2.9.0/lib/json/common.rb:221:in `encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError)
from /__w/workspace/workspace/workspaceOS/.bundle/ruby/3.2.0/gems/json-2.9.0/lib/json/common.rb:221:in `parse'
from /__w/workspace/workspace/workspaceOS/.bundle/ruby/3.2.0/gems/json-2.9.0/lib/json/common.rb:221:in `parse'
from /__w/workspace/workspace/workspaceOS/.bundle/ruby/3.2.0/gems/openstudio-standards-0.6.1/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb:93:in `block in load_standards_database_new'
from /__w/workspace/workspace/workspaceOS/.bundle/ruby/3.2.0/gems/openstudio-standards-0.6.1/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb:92:in `each'
from /__w/workspace/workspace/workspaceOS/.bundle/ruby/3.2.0/gems/openstudio-standards-0.6.1/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb:92:in `load_standards_database_new'
The locale isn't actually set, so it's POSIX
root@d2baf72eee0d:/var/simdata/openstudio# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
I have to run
locale-gen en_US en_US.UTF-8
# Either this
update-locale LANG=en_us.UTF-8
# or this
export LANG=en_us.UTF-8
Then it works.
It's possible my setup for the actual test I'm running is different than plain usage, because this still does work
$ docker run -it --rm nrel/openstudio:3.8.0
root@d2baf72eee0d:/var/simdata/openstudio# gem install openstudio-standards
root@d2baf72eee0d:/var/simdata/openstudio# ruby -e "require 'openstudio-standards'"
But the locale should probably be set to en_US.UTF-8 since that was the intent given
and
Metadata
Metadata
Assignees
Labels
No labels