#!/bin/sh # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Reference: # http://encoding.spec.whatwg.org/#single-byte-decoder # Download the following file, run it in source/data/mappings directory # and save the result to ibm-866_html5-2012.ucm # http://encoding.spec.whatwg.org/index-ibm866.txt ) cat < "ibm-866_html5-2012" "AXXXX" 1 1 "SBCS" \x7F "ASCII" CHARMAP PREAMBLE awk 'BEGIN { for (i=0; i < 0x80; ++i) { printf(" \\x%02X |0\n", i, i);}} !/^#/ && !/^$/ { printf (" \\x%02X |0\n", substr($2, 3), $1 + 0x80);}' \ index-ibm866.txt | sort echo 'END CHARMAP'