Bug 1993 - rpm warns Japanese JIS text in spec file as binary
rpm warns Japanese JIS text in spec file as binary
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 1999-04-04 22:19 EDT by inoue
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-04-05 11:34:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description inoue 1999-04-04 22:19:23 EDT
When we Japanese write some Japanese text in spec file like
this: Summary(ja): xxxxxxxx, rpm warns this file as binary
and exits if we use JIS kanji code for this text.
In Japan, commonly used kanji code for Linux is EUC-JP and
no problem occurs when we use EUC-JP in spec file, but
someone want to use JIS kanji code because JIS (ISO-2022-JP)
is also used widely, especially in mail, and EUC-JP itself
is based on JIS.
So please omit checking out ESC (0x1b) at this point:

diff -uNr rpm-2.5.5/build.c rpm-2.5.5.new/build.c
--- rpm-2.5.5/build.c	Fri Sep 25 05:23:16 1998
+++ rpm-2.5.5.new/build.c	Sat Apr  3 15:28:13 1999
@@ -128,7 +128,7 @@
     s = buf;
     while(count--) {
-	if (! (isprint(*s) || isspace(*s))) {
+	if (! (isprint(*s) || isspace(*s) || (*s == 0x1b))) {
 	    fprintf(stderr, _("File contains non-printable
characters(%c): %s\n"), *s,
Comment 1 Jeff Johnson 1999-04-05 11:24:59 EDT
Fixed in rpm CVS. Thanks for the report.

Note You need to log in before you can comment on or make changes to this bug.