Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519722 - iconv command inserts a extra control code "0F"
Summary: iconv command inserts a extra control code "0F"
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-12 13:34 UTC by Ondřej Súkup
Modified: 2014-08-15 08:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
bug-886416_data.zip (bug-886416_data.zip,414.18 KB, application/zip)
2014-08-12 13:34 UTC, Ondřej Súkup
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ondřej Súkup 2014-08-12 13:34:00 UTC
iconv -f IBM-943 -t IBM-930 INPUT_IBM943.txt > OUTPUT_IBM930.txt 

But the unnecessary Shift In "0F" that contorl character is inserted.
As the results the converted character makes unexpected sentence.
OUTPUT_IBM930.txt is also in attached file. it is generated from the iconv
command. 


Double "0f 0f" appear in address as following. 

 #hexdump -C OUTPUT_IBM930.txt |less

 0005fff0  40 40 40 40 40 40 40 f2  f0 f1 f4 0e 45 60 0f 0f  |@@@@@@@.....E`..| 

 0008fff0  5c 42 5c 42 5c 42 5c 42  5c 42 5c 42 5c 0f 0f 40  |\B\B\B\B\B\B\..@|

 005bfff0  61 0f f2 f0 0e 45 62 0f  0f 40 40 40 40 40 40 40  |a....Eb..@@@@@@@|



control character shift-out "0e" and shift-in "0f" should appear as this.
 000017e0  0e 45 60 0f f0 f6 0e 45  61 0f 40 40 40 40 40 40  |.E`....Ea.@@@@@@|
"0e" and "0f" are need to be paired.



NOTE:
http://en.wikipedia.org/wiki/Shift_in
shift-out control character is "0x0E". 
shift-in control character is "0x0F". 

Windows OS uses codeset IBM-943. It is IBM OS/2 Japanese, superset of Cp932 and
Shift-JIS.
 http://en.wikipedia.org/wiki/Shift_JIS
z/OS and AIX uses codeset IBM-930. It is EBCDIC Character Code.
 http://en.wikipedia.org/wiki/EBCDIC_930


Reproducible: Always




https://bugzilla.novell.com/show_bug.cgi?id=886416
Comment 1 Ondřej Súkup 2014-08-12 13:34:50 UTC
Created attachment 382750 [details]
bug-886416_data.zip
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-12 20:21:26 UTC
Please post your `emerge --info' output in a comment.