IBM Code Page 437...


 
Thread Tools Search this Thread
Operating Systems Linux IBM Code Page 437...
# 1  
Old 07-29-2019
IBM Code Page 437...

Hi all...

Reference this URL:
Lower ASCII characters.

Researching in google for an answer showed the numerous times this has been asked for in various guises.

So it inspired me to create a pseudo-IBM Code Page 437, the default ROM CGA-SVGA character set of yesteryear.
It really needs no step by step description as the code and images really speak for themselves.

This is now entirely owned by UNIX.COM...
Code:
#!/bin/bash
# GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
# Copyright © 2016 Free Software Foundation, Inc.
#
# Linux Mint 19, current update as of 28-07-2019.
#
# Author B.Walker, G0LCU - Issued as CC0 licence, (Public Domain), to UNIX.COM.
#
# CP437.sh
# Fun IBM Style Pseudo-CodePage 437 Demo...
#
# NOTE: The standard ASCII characters REMAIN STANDARD!

chr=( ' ' '☺' '☻' '♥' '♦' '♣' '♠' '-' '-' '-' '-' '♂' '♀' '♪' '♫' '☼' '-' '-' '↕' '' '¶' '§' '-' '↨' '↑' '↓' ''' '←' '∟' '↔' '-' '-' ' ' '!' '"' '#' '$' '%' '&' "'" '(' ')' '*' '+' ',' '-' '.' '/' '0' '1' '2' '3' '4' '5' '6' '7' '8' '9' ':' ';' '<' '=' '>' '?' '@' 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z' '[' '\' ']' '^' '_' '`' 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z' '{' '|' '}' '~' '⌂' 'Ç' 'ü' 'é' 'â' 'ä' 'à' 'å' 'ç' 'ê' 'ë' 'è' 'ï' 'î' 'ì' 'Ä' '...' 'É' 'æ' 'Æ' 'ô' 'ö' 'ò' 'û' 'ù' 'ÿ' '-' 'Ü' '¢' '£' '¥' '₧' ''' 'á' 'í' 'ó' 'ú' 'ñ' 'Ñ' 'ª' 'º' '¿' '⌐' '¬' '½' '¼' '¡' '«' '»' '-' '-'' '-' '│' '┤' '╡' '╢' '-' '╕' '╣' '║' '-' '╝' '╜' '╛' '┐' '└' '┴' '┬' '├' '─' '┼' '╞' '╟' '╚' '╔' '╩' '╦' '╠' '═' '╬' '╧' '╨' '╤' '╥' '╙' '╘' ''' '╓' '╫' '╪' '┘' '┌' '-' '-' '-' '-' '-' 'α' 'ß' 'Γ' 'π' 'Σ' 'σ' 'µ' 'τ' 'Φ' 'Θ' 'Ω' 'δ' '∞' 'φ' 'ε' '∩' '≡' '±' '≥' '≤' '⌠' '⌡' '÷' '≈' '°' '∙' '·' '√' 'ⁿ' '²' '-' ' ' )

# This loop demonstrates array access.
for n in {0..255}
do
    # printf "Character ${n} = %s\n" "${chr[${n}]}"
    printf "%s" "${chr[${n}]}"
done > IBM_ASCII

# This section demonstrates 'bash' style string slicing from a variable.
echo ""
ext_ascii=$( cat IBM_ASCII )
echo "${ext_ascii}"
echo ""
echo "This is the full sized block character:- '"${ext_ascii:219:1}"'..."
echo "This is the NULL character, 0:- '"${ext_ascii:0:1}"', and is given a space character..."
echo "Similarly the BLANK character, 255:- '"${ext_ascii:255:1}"', and also given a space character..."
echo ""

IBM Code Page 437...-cp437_terminalpng
IBM Code Page 437...-cp437png

Last edited by wisecracker; 07-29-2019 at 05:22 AM..
These 4 Users Gave Thanks to wisecracker For This Post:
# 2  
Old 07-29-2019
Everyone appreciates these kinds of excellent and informative posts.

Thanks for this post for both the topic at hand (in the referenced link) and for future users who may run across a similar issue.

On behalf of our users, thank you wisecracker!

Your post in is the same spirit was what made the site great a decade ago.

Thank you again.

Neo
This User Gave Thanks to Neo For This Post:
# 3  
Old 07-29-2019
Last upload by myself for this thread...
A fully POSIX compliant version using the default POSIX '#!/bin/sh' for Linux Mint 19, which is '#!/bin/dash'.
Code:
#!/bin/dash
# Default dash for......
# Linux Mint 19, current update as of 28-07-2019.
#
# Fully POSIX compliant Demo...
# Author B.Walker, G0LCU - Issued as CC0 licence, (Public Domain), to UNIX.COM.
#
# CP437_POSIX.sh
# Fun IBM Style Pseudo-CodePage 437 Demo...
#
# NOTE: The standard ASCII characters REMAIN STANDARD!

CP437=''
BLOCK=''
DITHER=''

# Create the _binary_ file...
printf "\040\342\230\272\342\230\273\342\231\245\342\231\246\342\231\243\342\231\240\342\200\242\342\227\230\342\227\213\342\227\231\342\231\202\342\231\200\342\231\252\342\231\253\342\230\274\342\226\272\342\227\204\342\206\225\342\200\274\302\266\302\247\342\226\254\342\206\250\342\206\221\342\206\223\342\206\222\342\206\220\342\210\237\342\206\224\342\226\262\342\226\274\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\342\214\202\303\207\303\274\303\251\303\242\303\244\303\240\303\245\303\247\303\252\303\253\303\250\303\257\303\256\303\254\303\204\303\205\303\211\303\246\303\206\303\264\303\266\303\262\303\273\303\271\303\277\303\226\303\234\302\242\302\243\302\245\342\202\247\306\222\303\241\303\255\303\263\303\272\303\261\303\221\302\252\302\272\302\277\342\214\220\302\254\302\275\302\274\302\241\302\253\302\273\342\226\221\342\226\222\342\226\223\342\224\202\342\224\244\342\225\241\342\225\242\342\225\226\342\225\225\342\225\243\342\225\221\342\225\227\342\225\235\342\225\234\342\225\233\342\224\220\342\224\224\342\224\264\342\224\254\342\224\234\342\224\200\342\224\274\342\225\236\342\225\237\342\225\232\342\225\224\342\225\251\342\225\246\342\225\240\342\225\220\342\225\254\342\225\247\342\225\250\342\225\244\342\225\245\342\225\231\342\225\230\342\225\222\342\225\223\342\225\253\342\225\252\342\224\230\342\224\214\342\226\210\342\226\204\342\226\214\342\226\220\342\226\200\316\261\303\237\316\223\317\200\316\243\317\203\302\265\317\204\316\246\316\230\316\251\316\264\342\210\236\317\206\316\265\342\210\251\342\211\241\302\261\342\211\245\342\211\244\342\214\240\342\214\241\303\267\342\211\210\302\260\342\210\231\302\267\342\210\232\342\201\277\302\262\342\226\240\040" > IBM_CP437

CP437=$( cat IBM_CP437 )

# Extract some characters and create a pseudo gradient...
echo ""
echo "${CP437}"
echo ""
echo "Obtain block character..."
BLOCK=${CP437%%-*}
BLOCK=${BLOCK##*┌}
echo "Now obtain 3 dithered characters..."
DITHER=${CP437%%│*}
DITHER=${DITHER##*»}
echo "Join a space, the DITHERs and BLOCK together to give a pseudo-gradient:-"
echo ""
echo "' ${DITHER}${BLOCK}'"
echo ""

Enjoy finding simple solutions to often difficult problems...
Bazza.
IBM Code Page 437...-cp437_posixpng
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

IBM Virtual Machine OS on intel x86 and x64? IBM AIX OS on IBM Virtual Machine?

Hi There, I have zero information and zero knowledge for IBM virtual machine except Amazon cloud and VMware ESXi (Only Linux OS available). Anyone could provide me the following answer - Can IBM VM been deploy on X86 and X64 (Intel Chip)? If answer is yes any chance to deploy AIX OS... (13 Replies)
Discussion started by: chenyung
13 Replies

2. UNIX for Dummies Questions & Answers

Difference between code page used with grep and vi

Not certain the title is phrased correctly but here's the issue: I need to scrape data out of a pdf file. I ftp the file from windows to unix(solaris 10) as a binary file. Open the file in vi and search for a string, Matrix, but no joy. Then I cat the same file, pipe it to grep 'Matrix' and the... (3 Replies)
Discussion started by: rj0
3 Replies

3. AIX

Code Page IBM-860

Helo all, I' trying to print Portuguese special characters like , , , . I already set my print queue for CODE PAGE of printer ibm.860 but every time i send a print test i receive the following error: 0782-059 Attribute name passed to subroutine piocmdout by program... (2 Replies)
Discussion started by: marques_rmc
2 Replies

4. Hardware

IBM 3583 Tape Drive License Feature Code

Team , currently I am doing some inventory on our hardware. I know that the old school IBM 3583 tape drive has some license feature enable but I dont know where can I check If the feature currently enable or not on our drive... Ive checked trough Web Base and Panel base but nowhere I... (0 Replies)
Discussion started by: thermometer
0 Replies

5. AIX

IBM AIX on IBM Eseries & x series server

Hi, I want to know whether IBM AIX can be installed on the IBM e series and x series server hardware? Thanks & Regards Arun (2 Replies)
Discussion started by: Arun.Kakarla
2 Replies

6. Shell Programming and Scripting

Getting source code of a page

I want to download a particular page from the internet and get the source code of the page in html format. I want to parse the source code to find a specific parameters using grep command. could someone tell me the linux command to download a specific page and parse the source code of it. ... (1 Reply)
Discussion started by: ahamed
1 Replies

7. High Performance Computing

IBM Scheduler for High Throughput Computing on IBM Blue Gene P

A lightweight scheduler that supports high-throughput computing (HTC) applications on Blue Gene/P. (NEW: 06/12/2008 in grid) More... (0 Replies)
Discussion started by: Linux Bot
0 Replies

8. Shell Programming and Scripting

Code page in Unix

Hi, Can someone tell me how do I find the list of comptabile codepages on Linux(suse) , Is it /usr/lib/locale or somewhere else ? I was wandering if someone has expereince in using cycrillic chars (russian) in unix / linux ? Thanks (2 Replies)
Discussion started by: braindrain
2 Replies
Login or Register to Ask a Question