{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/mcomix/feed/json -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/mcomix", "feed_url": "https://matoken.org/blog/tag/mcomix/feed/json", "language": "ja", "title": "mcomix – matoken's meme", "items": [ { "id": "https://matoken.org/blog/?p=4051", "url": "https://matoken.org/blog/2024/07/29/mcomix-did-not-start-because-locale-was-wrong/", "title": "locale \u304c\u9593\u9055\u3063\u3066\u3044\u3066 MComix \u304c\u8d77\u52d5\u3057\u306a\u304b\u3063\u305f", "content_html": "
\u6700\u8fd1\u65b0\u3057\u304f\u7aef\u672b\u3092\u8cfc\u5165\u3057\uff0c\u4f8b\u306b\u3088\u3063\u3066 Debian sid \u3092\u5165\u308c\u3066\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u4e2d\u3067\u3059\uff0e
\n\u3057\u304b\u3057\uff0c MComix \u304c\u8d77\u52d5\u3057\u307e\u305b\u3093\uff0e
\n
\u7aef\u672b\u3067\u8a66\u3059\u3068\u3053\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\uff0e
\n$ mcomix\nTraceback (most recent call last):\n File \"/usr/bin/mcomix\", line 8, in <module>\n sys.exit(main())\n ^^^^^^\n File \"/usr/lib/python3/dist-packages/mcomix/__main__.py\", line 26, in main\n run()\n File \"/usr/lib/python3/dist-packages/mcomix/run.py\", line 154, in run\n i18n.install_gettext()\n File \"/usr/lib/python3/dist-packages/mcomix/i18n.py\", line 82, in install_gettext\n lang = portability.get_default_locale()\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/mcomix/portability.py\", line 49, in get_default_locale\n lang, _ = locale.getdefaultlocale((\"LANGUAGE\", \"LC_ALL\", \"LC_MESSAGES\", \"LANG\"))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.12/locale.py\", line 549, in getdefaultlocale\n return _getdefaultlocale(envvars)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.12/locale.py\", line 579, in _getdefaultlocale\n return _parse_localename(localename)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.12/locale.py\", line 496, in _parse_localename\n raise ValueError('unknown locale: %s' % localename)\n ValueError: unknown locale: ja_JP-UTF-8\n$ env | grep ja_JP-UTF-8\nLANGUAGE=ja_JP-UTF-8\n
locale \u304c ja_JP-UTF-8
\u3068 ja_JP.UTF-8
\u306e Typo \u3089\u3057\u304d\u3082\u306e\u306b\u306a\u3063\u3066\u304a\u308a\u77e5\u3089\u306a\u3044 locale \u3060\u3068\u3044\u3046\u3053\u3068\u3067\u8d77\u52d5\u306b\u5931\u6557\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e
\n$ LANGUAGE=ja_JP.UTF-8 mcomix
\u3068\u3059\u308b\u3068\u8d77\u52d5\u3057\u307e\u3059\uff0e
ja_JP-UTF-8
\u3092\u3069\u3053\u304b\u3067\u9593\u9055\u3063\u3066\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3063\u305f\u306e\u3060\u308d\u3046\u3068\u63a2\u3059\u3068 /etc/locale.conf
\u306b\u898b\u3064\u3051\u307e\u3057\u305f\uff0e
\n\u3053\u308c\u3092 ja_JP.UTF-8
\u306b\u4fee\u6b63\uff0c\u518d\u8d77\u52d5\u3059\u308b\u3053\u3068\u3067\u4fee\u6b63\u3055\u308c\u307e\u3057\u305f\uff0e
$ sudo localectl set-locale ja_JP.UTF-8\n$ sudo git -C /etc diff locale.conf\ndiff --git a/locale.conf b/locale.conf\nindex ee5c432..6345544 100644\n--- a/locale.conf\n+++ b/locale.conf\n@@ -1,2 +1,2 @@\n LANG=ja_JP.UTF-8\n-LANGUAGE=ja_JP-UTF-8\n+LANGUAGE=ja_JP.UTF-8\n
/etc/locale.conf
\u306f systemd \u306e\u3082\u306e\u306e\u3088\u3046\u3067\u3059\uff0e
\n/etc/locale.conf
\u304c\u30b7\u30b9\u30c6\u30e0\u30ef\u30a4\u30c9\u306e\u8a2d\u5b9a\uff0c ~/.config/locale.conf
\u304c\u30e6\u30fc\u30b6\u30fc\u306e\u8a2d\u5b9a\u306e\u3088\u3046\u3067\u3059\uff0e
\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3057\u305f\uff0e
\n$ localectl set-locale LANG=C\n$ cat /etc/locale.conf\nLANG=C\n$ cat ~/.config/locale.conf\nLANG=ja_JP.UTF-8\nLANGUAGE=ja_JP.UTF-8\nLC_NUMERIC=en_US.UTF-8\nLC_TIME=en_US.UTF-8\n\n\n$ systemctl reboot\n
\u3057\u304b\u3057\uff0c ~/.config/locale.conf \u306f\u3046\u307e\u304f\u53cd\u6620\u3055\u308c\u306a\u304b\u3063\u305f\u306e\u3067\u7d50\u5c40\u3044\u3064\u3082\u306e ~/.profile \u3067\u8a2d\u5b9a\u3057\u76f4\u3057\u307e\u3057\u305f\uff0e
\n$ locale\nLANG=ja_JP.UTF-8\nLANGUAGE=ja_JP.UTF-8\nLC_CTYPE=\"ja_JP.UTF-8\"\nLC_NUMERIC=en_US.UTF-8\nLC_TIME=en_US.UTF-8\nLC_COLLATE=\"ja_JP.UTF-8\"\nLC_MONETARY=\"ja_JP.UTF-8\"\nLC_MESSAGES=\"ja_JP.UTF-8\"\nLC_PAPER=\"ja_JP.UTF-8\"\nLC_NAME=\"ja_JP.UTF-8\"\nLC_ADDRESS=\"ja_JP.UTF-8\"\nLC_TELEPHONE=\"ja_JP.UTF-8\"\nLC_MEASUREMENT=\"ja_JP.UTF-8\"\nLC_IDENTIFICATION=\"ja_JP.UTF-8\"\nLC_ALL=\n
\u3053\u306e\u74b0\u5883\u306f\uff0cDebian testing \u306e 20240718 \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3067\u5c0e\u5165\u3057\u3066\u3059\u3050\u306b sid \u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u3082\u306e\u3067\u3059\uff0e
\nloale \u306f ja_JP.UTF-8, en_US.UTF-8, C.UTF-8
\u3092\u30c6\u30ad\u30b9\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u30fc\u304b\u3089\u9078\u629e\uff0c ja_JP.UTF-8
\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u30ed\u30b1\u30fc\u30eb\u306b\uff0e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c sid \u306b dist-upgrade \u3057\u3066\u624b\u52d5\u8a2d\u5b9a\u3092\u4e0b\u899a\u3048\u306e\u306a\u3044\u74b0\u5883\u3067\u3059\uff0e
\n\u6298\u3092\u898b\u3066\u518d\u5ea6\u8a66\u3057\u3066\u307f\u305f\u3044\u3068\u3053\u308d\u3067\u3059\uff0e
$ dpkg-query -W locales systemd\nlocales 2.39-6\nsystemd 256.4-2\n$ lsb_release -dr\nDescription: Debian GNU/Linux trixie/sid\nRelease: n/a\n$ arch\nx86_64\n
MComix\u3068\u3044\u3046\u30b3\u30df\u30c3\u30af\u30d3\u30e5\u30ef\u30fc\u304c\u3042\u308a\u307e\u3059\uff0eComix\u304b\u3089\u306e\u30d5\u30a9\u30fc\u30af\u3067\u3059\uff0e\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u3084\u30a2\u30fc\u30ab\u30a4\u30d6\u30d5\u30a1\u30a4\u30eb\u306e\u753b\u50cf\u3092\u898b\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u3066\u6240\u8b02\u81ea\u708a\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u306e\u306b\u3082\u4fbf\u5229\u3067\u3059\uff0e
\n\u4ee5\u4e0b\u306e\u3088\u3046\u306bPDF\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\uff0c\u5b9f\u969b\u306b\u958b\u3053\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u3068\u306a\u308a\u307e\u3057\u305f\uff0e
\n\n
Reads most common image formats, as well as PDF, ZIP, RAR, 7Z and LHA archives directly.
\nREADME\u3092\u78ba\u8a8d\u3059\u308b\u3068\uff0cDependencies\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3053\u3068\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3057\u305f\uff0e
\nTo read PDF files, MComix can use the tools provided by MuPDF, namely\nmutool and mudraw.\n
PDF\u306e\u95b2\u89a7\u306b\u306fMuPDF\u306emutool\u3068mudraw\u304c\u5fc5\u8981\u306a\u3088\u3046\u3067\u3059\uff0e
\nDebian \u3067\u306fmupdf-tools\u30d1\u30c3\u30b1\u30fc\u30b8\u3067mutool\u304c\u5c0e\u5165\u3067\u304d\u307e\u3059\uff0emudraw\u304c\u3042\u308a\u307e\u305b\u3093\u304c\uff0c\u6700\u8fd1\u306fmutool draw\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u306emupdf-tools\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u5c0e\u5165\u3060\u3051\u3067\u3088\u3055\u305d\u3046\u3067\u3059\uff0e
$ sudo apt install mupdf-tools\n
mcomix\u3068mupdf-tools\u306e\u5c0e\u5165\u3055\u308c\u305f\u72b6\u614b\u3067MComix\u3092\u8d77\u52d5\u3057\uff0cPDF\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3068\u3061\u3083\u3093\u3068\u958b\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f :)
\n\u4ee5\u4e0b\u3088\u304f\u4f7f\u3046\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u3059\uff0e
\u898b\u958b\u304d\u3067\u773a\u3081\u3066\u6587\u5b57\u306e\u5c0f\u3055\u306a\u90e8\u5206\u306f\u30b7\u30f3\u30b0\u30eb\u30da\u30fc\u30b8\u306b\u3057\u3066\u6a2a\u5e45\u306b\u30d5\u30a3\u30c3\u30c8\u3055\u305b\u3066\u8aad\u3080\u3068\u3044\u3046\u611f\u3058\u3067\u4f7f\u3063\u3066\u3044\u307e\u3059\uff0e
\n\n Note \n | \n\n\u3061\u306a\u307f\u306b\uff0cRAR\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u958b\u304d\u305f\u3044\u5834\u5408\u306f unrara or rar \u3092\uff0c7Zip\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u958b\u304d\u305f\u3044\u5834\u5408\u306f 7z \u3092\uff0clhz\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u958b\u304d\u305f\u3044\u5834\u5408\u306f lha \u306e\u5c0e\u5165\u304c\u5fc5\u8981\u306a\u3088\u3046\u3067\u3059\uff0e\u5fc5\u8981\u306a\u3082\u306e\u304c\u3042\u308b\u5834\u5408\u306f\u5165\u308c\u3066\u304a\u304d\u307e\u3057\u3087\u3046\uff0e | \n
$ dpkg-query -W mupdf-tools mcomix\nmcomix 1.2.1mcomix3+git20200206-1\nmupdf-tools 1.20.0+ds1-1\n$ lsb_release -dr\nDescription: Debian GNU/Linux bookworm/sid\nRelease: unstable\n$ arch\nx86_64\n
mcomix \u304c\u8d77\u52d5\u3057\u306a\u304f\u306a\u308a\u307e\u3057\u305f\uff0e\u3053\u306a\u3044\u3060\u306e\u30a8\u30f3\u30d0\u30b0?\u3068\u601d\u3063\u305f\u3051\u3069
\n\u30a8\u30e9\u30fc\u304c\u9055\u3046\uff0e
\n$ mcomix\nTraceback (most recent call last):\n File \"/usr/bin/mcomix\", line 11, in <module>\n load_entry_point('mcomix==1.2.1', 'console_scripts', 'mcomix')()\n File \"/usr/lib/python2.7/dist-packages/mcomix/run.py\", line 127, in run\n i18n.install_gettext()\n File \"/usr/lib/python2.7/dist-packages/mcomix/i18n.py\", line 71, in install_gettext\n locale.setlocale(locale.LC_ALL, '')\n File \"/usr/lib/python2.7/locale.py\", line 581, in setlocale\n return _setlocale(category, locale)\nlocale.Error: unsupported locale setting\n
locale\u307d\u3044\u306e\u3067\u9069\u5f53\u306b\u6307\u5b9a\u3057\u3066\u307f\u308b\u3068\u8d77\u52d5\uff0e
\n$ LC_ALL=C mcomix\n
\u3057\u304b\u3057\uff0cC
\u3060\u3068\u65e5\u672c\u8a9e\u30d5\u30a1\u30a4\u30eb\u540d\u306a\u3069\u3067\u30a8\u30e9\u30fc\u3068\u306a\u308b\uff0e
UnicodeEncodeError: 'ascii' codec can't encode characters in position 25-27: ordinal not in range(128)\nTraceback (most recent call last):\n File \"/usr/lib/python2.7/dist-packages/mcomix/file_chooser_base_dialog.py\", line 215, in _response\n if os.path.isdir(path):\n File \"/usr/lib/python2.7/genericpath.py\", line 49, in isdir\n st = os.stat(s)\nUnicodeEncodeError: 'ascii' codec can't encode characters in position 25-27: ordinal not in range(128)\n
en_US.UTF-8
\u3060\u3068\u3068\u308a\u3042\u3048\u305a\u5229\u7528\u3067\u304d\u308b\u3051\u3069\uff0cja_JP.UTF-8
\u3068\u304b\u3067\u65e5\u672c\u8a9e\u3092\u6307\u5b9a\u3059\u308b\u3068\u2026\u2026\u3046\u307e\u304f\u884c\u304b\u306a\u3044?
$ export LC_ALL=ja_JP.UTF-8 mcomix\nbash: warning: setlocale: LC_ALL: cannot change locale (ja_JP.UTF-8)\n
locale\u3092\u78ba\u8a8d\u3059\u308b\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u305f\u3064\u3082\u308a\u306e ja_JP.UTF-8
\u304c\u3042\u308a\u307e\u305b\u3093\uff0e
$ grep -v ^# /etc/locale.gen |uniq\n\nen_US.UTF-8 UTF-8\n
/etc/locale.gen
\u3092\u7de8\u96c6\u3057\u3066\uff0cja_JP.UTF-8
\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u3066 locale-gen
\u30b3\u30de\u30f3\u30c9\u3067\u751f\u6210\u3057\u305f\u3089\u52d5\u304f\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e
$ sudo git diff HEAD~~ /etc/locale.gen\ndiff --git a/locale.gen b/locale.gen\nindex c432a9a..afb6141 100644\n--- a/locale.gen\n+++ b/locale.gen\n@@ -287,7 +287,7 @@ en_US.UTF-8 UTF-8\n # it_IT@euro ISO-8859-15\n # iu_CA UTF-8\n # ja_JP.EUC-JP EUC-JP\n-# ja_JP.UTF-8 UTF-8\n+ja_JP.UTF-8 UTF-8\n # ka_GE GEORGIAN-PS\n # ka_GE.UTF-8 UTF-8\n # kab_DZ UTF-8\n
$ sudo locale-gen\nGenerating locales (this might take a while)...\n en_US.UTF-8... done\n ja_JP.UTF-8... done\nGeneration complete.\n
$ dpkg-query -W locales mcomix\nlocales 2.29-1\nmcomix 1.2.1-1.1\n$ lsb_release -dr\nDescription: Debian GNU/Linux bullseye/sid\nRelease: unstable\n$ uname -m\nx86_64\n