Bug 1993

Summary: rpm warns Japanese JIS text in spec file as binary
Product: [Retired] Red Hat Linux Reporter: inoue
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-04-05 15:34:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description inoue 1999-04-05 02:19:23 UTC
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 @@
     close(fd);
     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,
 		    specfile);
 	    ret

Comment 1 Jeff Johnson 1999-04-05 15:24:59 UTC
Fixed in rpm CVS. Thanks for the report.