SheetJS
0121708499
- MakeEncoding.cs program pulls from .NET encodings (tested with Windows 7) (outputs stored at dotnet/out and misc/err) - Many new codepages and improvements - coverage + coveralls - better environment handling (h/t @xch89820) - cpexcel.js for the formats recognized by excel - decode endian option removed (implicit from codepage definition) NOTE: utf7 encode can be more space efficient
16 lines
440 B
Bash
Executable File
16 lines
440 B
Bash
Executable File
#!/bin/bash
|
|
OFILE=${1:-ctest/fixtures.js}
|
|
|
|
echo "README={}" > $OFILE
|
|
make_file(){
|
|
echo "README['"$1"'] = " >> $OFILE
|
|
echo "$2" >> $OFILE
|
|
echo ";" >> $OFILE
|
|
}
|
|
|
|
make_file "str" "$(node -pe "JSON.stringify(require('fs').readFileSync('misc/codepage.md.utf8','utf8'))")"
|
|
for enc in ascii utf{7,8,{16,32}{le,be}}; do
|
|
echo "$enc" >&2
|
|
make_file "$enc" "$(node -pe "JSON.stringify(require('fs').readFileSync('misc/codepage.md.$enc'))")"
|
|
done
|