Bug 163168

Summary: JIS X0208 space should be treated as printable in ja_JP.eucJP locale.
Product: Base System Reporter: HATANO Tomomi <hatanou>
Component: binAssignee: Hiroki Sato <hrs>
Status: Closed FIXED    
Severity: Affects Many People CC: hrs, lwhsu
Priority: Normal    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.shar none

Description HATANO Tomomi 2011-12-10 19:40:03 UTC
In ja_JP.eucJP locale, 0xa1a1 is JIS X0208 space (i.e. full-width space).
This character is not marked as PRINT in mklocale source file.
This affects programmes using iswprint(3), e.g. ls(1).

Fix: Apply this patch and
re-create /usr/share/locale/ja_JP.eucJP/LC_CTYPE.
How-To-Repeat: Go into ja_JP.eucJP locale,
create a file which has full-width space in its name,
then ls(1).
'?' is printed out where full-width space sould be.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:26 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Li-Wen Hsu freebsd_committer freebsd_triage 2020-06-27 07:22:26 UTC
HATANO: Source of /usr/share/locale/ja_JP.eucJP/LC_CTYPE has been modified a lot and the patch doesn't apply anymore. Can you check if the newer FreeBSD still have this issue?
Comment 3 Hiroki Sato freebsd_committer freebsd_triage 2020-06-28 03:33:07 UTC
I confirmed that IDEOGRAPHIC_SPACE is still categorized as non-printable and non-space in the current implementation after we adopt CLDR.  This is not specific to Japanese.

I will look into possible solutions.  This cannot be fixed with a simple one-line patch.
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-06-29 03:23:59 UTC
A commit references this bug:

Author: hrs
Date: Mon Jun 29 03:23:13 UTC 2020
New revision: 362770
URL: https://svnweb.freebsd.org/changeset/base/362770

Log:
  Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS.

  PR:		163168
  MFC after:	3 days

Changes:
  head/share/ctypedef/ja_JP.eucJP.src
Comment 5 Hiroki Sato freebsd_committer freebsd_triage 2020-06-29 03:26:28 UTC
ctypedef for eucJP and SJIS were incorrect and should be fixed at r362770.  Will be MFC shortly.
Comment 6 Hiroki Sato freebsd_committer freebsd_triage 2020-06-29 05:41:10 UTC
JFYI, this is a related change to this PR: https://reviews.freebsd.org/D25503
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-07-04 07:05:36 UTC
A commit references this bug:

Author: hrs
Date: Sat Jul  4 07:04:57 UTC 2020
New revision: 362925
URL: https://svnweb.freebsd.org/changeset/base/362925

Log:
  MFC r362770:

  Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS.

  PR:		163168

Changes:
_U  stable/11/
  stable/11/share/ctypedef/ja_JP.eucJP.src
_U  stable/12/
  stable/12/share/ctypedef/ja_JP.eucJP.src
Comment 8 Hiroki Sato freebsd_committer freebsd_triage 2020-07-04 07:08:23 UTC
Fixed in stable/11 and stable/12, too.  If this or a related problem persists, please reopen this PR.