[GH-ISSUE #103] UTF-8 native locale on OS X #696

Closed
opened 2026-03-15 08:53:45 +03:00 by kerem · 7 comments
Owner

Originally created by @nevalla on GitHub (May 25, 2015).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/103

When I try to run asciinema rec I will get the following error

asciinema needs a UTF-8 native locale to run. Check the output of `locale` command.

Output of locale command by default is

LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

I tried to modify my locale settings as following:

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

But it did not help.

What part should I modify in order to get asciinema run properly?

UPDATE: Tried to install from Homebrew, and version 0.9.9 worked correctly, but after upgrading it to version 1.0.0 I got the error back

Originally created by @nevalla on GitHub (May 25, 2015). Original GitHub issue: https://github.com/asciinema/asciinema/issues/103 When I try to run `asciinema rec` I will get the following error ``` asciinema needs a UTF-8 native locale to run. Check the output of `locale` command. ``` Output of `locale` command by default is ``` LANG= LC_COLLATE="C" LC_CTYPE="UTF-8" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= ``` I tried to modify my locale settings as following: ``` LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL= ``` But it did not help. What part should I modify in order to get asciinema run properly? UPDATE: Tried to install from Homebrew, and version 0.9.9 worked correctly, but after upgrading it to version 1.0.0 I got the error back
kerem closed this issue 2026-03-15 08:53:51 +03:00
Author
Owner

@ku1ik commented on GitHub (May 25, 2015):

It's about LC_CTYPE. asciinema expects it to be in format xx_XX.UTF-8 like others. It may be wrong assumption though, I'm now trying to find information whether "UTF-8" is correct value.

<!-- gh-comment-id:105249665 --> @ku1ik commented on GitHub (May 25, 2015): It's about `LC_CTYPE`. asciinema expects it to be in format `xx_XX.UTF-8` like others. It may be wrong assumption though, I'm now trying to find information whether `"UTF-8"` is correct value.
Author
Owner

@nevalla commented on GitHub (May 27, 2015):

Just upgraded to version 1.1.0 and it's working now as expected 👍

<!-- gh-comment-id:105886313 --> @nevalla commented on GitHub (May 27, 2015): Just upgraded to version 1.1.0 and it's working now as expected :+1:
Author
Owner

@ku1ik commented on GitHub (May 27, 2015):

Thanks for feedback!

<!-- gh-comment-id:105886496 --> @ku1ik commented on GitHub (May 27, 2015): Thanks for feedback!
Author
Owner

@prog110 commented on GitHub (Jun 22, 2015):

How can I update these variable without hacking with the environment variables?

I use ubuntu 14.04 & tried running

sudo dpkg-reconfigure locales
sudo update-locale LC_ALL=en_IN.UTF-8 LANG=en_IN.UTF-8

update-locale seems to update /etc/default/locale, but not the environment variables LC__/LANG_ variables

<!-- gh-comment-id:114104826 --> @prog110 commented on GitHub (Jun 22, 2015): How can I update these variable without hacking with the environment variables? I use ubuntu 14.04 & tried running ``` sh sudo dpkg-reconfigure locales sudo update-locale LC_ALL=en_IN.UTF-8 LANG=en_IN.UTF-8 ``` `update-locale` seems to update `/etc/default/locale`, but not the environment variables LC__/LANG_ variables
Author
Owner

@ku1ik commented on GitHub (Jun 22, 2015):

@thekalinga You can run LC_ALL=en_IN.UTF-8 asciinema rec.

<!-- gh-comment-id:114200176 --> @ku1ik commented on GitHub (Jun 22, 2015): @thekalinga You can run `LC_ALL=en_IN.UTF-8 asciinema rec`.
Author
Owner

@JulioPapel commented on GitHub (Apr 2, 2017):

Just go to Terminal > Preferences > Profiles > Advanced

  • Set: Text encoding to: Unicode (UTF-8)
  • Check: Set locale environment variables on startup.
<!-- gh-comment-id:291007031 --> @JulioPapel commented on GitHub (Apr 2, 2017): Just go to Terminal > Preferences > Profiles > Advanced - Set: Text encoding to: Unicode (UTF-8) - Check: Set locale environment variables on startup.
Author
Owner

@nic commented on GitHub (Mar 25, 2018):

On iTerm:

captura de tela 2018-03-25 as 17 40 53

<!-- gh-comment-id:376001762 --> @nic commented on GitHub (Mar 25, 2018): On iTerm: ![captura de tela 2018-03-25 as 17 40 53](https://user-images.githubusercontent.com/66042/37879735-c0f74f76-3053-11e8-84cd-80f78284f6ec.png)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#696
No description provided.