-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2505 from herwinw/koi8
Implement KOI8 Encodings
- Loading branch information
Showing
11 changed files
with
347 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#pragma once | ||
|
||
#include <assert.h> | ||
#include <initializer_list> | ||
|
||
#include "natalie/encoding/single_byte_encoding_object.hpp" | ||
#include "natalie/string_object.hpp" | ||
|
||
namespace Natalie { | ||
|
||
using namespace TM; | ||
|
||
class Koi8REncodingObject : public SingleByteEncodingObject { | ||
public: | ||
Koi8REncodingObject(); | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#pragma once | ||
|
||
#include <assert.h> | ||
#include <initializer_list> | ||
|
||
#include "natalie/encoding/single_byte_encoding_object.hpp" | ||
#include "natalie/string_object.hpp" | ||
|
||
namespace Natalie { | ||
|
||
using namespace TM; | ||
|
||
class Koi8UEncodingObject : public SingleByteEncodingObject { | ||
public: | ||
Koi8UEncodingObject(); | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
#include "natalie.hpp" | ||
|
||
namespace Natalie { | ||
|
||
static const long KOI8R[] = { | ||
0X2500, | ||
0X2502, | ||
0X250C, | ||
0X2510, | ||
0X2514, | ||
0X2518, | ||
0X251C, | ||
0X2524, | ||
0X252C, | ||
0X2534, | ||
0X253C, | ||
0X2580, | ||
0X2584, | ||
0X2588, | ||
0X258C, | ||
0X2590, | ||
0X2591, | ||
0X2592, | ||
0X2593, | ||
0X2320, | ||
0X25A0, | ||
0X2219, | ||
0X221A, | ||
0X2248, | ||
0X2264, | ||
0X2265, | ||
0XA0, | ||
0X2321, | ||
0XB0, | ||
0XB2, | ||
0XB7, | ||
0XF7, | ||
0X2550, | ||
0X2551, | ||
0X2552, | ||
0X451, | ||
0X2553, | ||
0X2554, | ||
0X2555, | ||
0X2556, | ||
0X2557, | ||
0X2558, | ||
0X2559, | ||
0X255A, | ||
0X255B, | ||
0X255C, | ||
0X255D, | ||
0X255E, | ||
0X255F, | ||
0X2560, | ||
0X2561, | ||
0X401, | ||
0X2562, | ||
0X2563, | ||
0X2564, | ||
0X2565, | ||
0X2566, | ||
0X2567, | ||
0X2568, | ||
0X2569, | ||
0X256A, | ||
0X256B, | ||
0X256C, | ||
0XA9, | ||
0X44E, | ||
0X430, | ||
0X431, | ||
0X446, | ||
0X434, | ||
0X435, | ||
0X444, | ||
0X433, | ||
0X445, | ||
0X438, | ||
0X439, | ||
0X43A, | ||
0X43B, | ||
0X43C, | ||
0X43D, | ||
0X43E, | ||
0X43F, | ||
0X44F, | ||
0X440, | ||
0X441, | ||
0X442, | ||
0X443, | ||
0X436, | ||
0X432, | ||
0X44C, | ||
0X44B, | ||
0X437, | ||
0X448, | ||
0X44D, | ||
0X449, | ||
0X447, | ||
0X44A, | ||
0X42E, | ||
0X410, | ||
0X411, | ||
0X426, | ||
0X414, | ||
0X415, | ||
0X424, | ||
0X413, | ||
0X425, | ||
0X418, | ||
0X419, | ||
0X41A, | ||
0X41B, | ||
0X41C, | ||
0X41D, | ||
0X41E, | ||
0X41F, | ||
0X42F, | ||
0X420, | ||
0X421, | ||
0X422, | ||
0X423, | ||
0X416, | ||
0X412, | ||
0X42C, | ||
0X42B, | ||
0X417, | ||
0X428, | ||
0X42D, | ||
0X429, | ||
0X427, | ||
0X42A, | ||
}; | ||
|
||
Koi8REncodingObject::Koi8REncodingObject() | ||
: SingleByteEncodingObject { Encoding::KOI8_R, { "KOI8-R", "CP878" }, KOI8R } { } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
#include "natalie.hpp" | ||
|
||
namespace Natalie { | ||
|
||
static const long KOI8U[] = { | ||
0X2500, | ||
0X2502, | ||
0X250C, | ||
0X2510, | ||
0X2514, | ||
0X2518, | ||
0X251C, | ||
0X2524, | ||
0X252C, | ||
0X2534, | ||
0X253C, | ||
0X2580, | ||
0X2584, | ||
0X2588, | ||
0X258C, | ||
0X2590, | ||
0X2591, | ||
0X2592, | ||
0X2593, | ||
0X2320, | ||
0X25A0, | ||
0X2219, | ||
0X221A, | ||
0X2248, | ||
0X2264, | ||
0X2265, | ||
0XA0, | ||
0X2321, | ||
0XB0, | ||
0XB2, | ||
0XB7, | ||
0XF7, | ||
0X2550, | ||
0X2551, | ||
0X2552, | ||
0X451, | ||
0X454, | ||
0X2554, | ||
0X456, | ||
0X457, | ||
0X2557, | ||
0X2558, | ||
0X2559, | ||
0X255A, | ||
0X255B, | ||
0X491, | ||
0X255D, | ||
0X255E, | ||
0X255F, | ||
0X2560, | ||
0X2561, | ||
0X401, | ||
0X404, | ||
0X2563, | ||
0X406, | ||
0X407, | ||
0X2566, | ||
0X2567, | ||
0X2568, | ||
0X2569, | ||
0X256A, | ||
0X490, | ||
0X256C, | ||
0XA9, | ||
0X44E, | ||
0X430, | ||
0X431, | ||
0X446, | ||
0X434, | ||
0X435, | ||
0X444, | ||
0X433, | ||
0X445, | ||
0X438, | ||
0X439, | ||
0X43A, | ||
0X43B, | ||
0X43C, | ||
0X43D, | ||
0X43E, | ||
0X43F, | ||
0X44F, | ||
0X440, | ||
0X441, | ||
0X442, | ||
0X443, | ||
0X436, | ||
0X432, | ||
0X44C, | ||
0X44B, | ||
0X437, | ||
0X448, | ||
0X44D, | ||
0X449, | ||
0X447, | ||
0X44A, | ||
0X42E, | ||
0X410, | ||
0X411, | ||
0X426, | ||
0X414, | ||
0X415, | ||
0X424, | ||
0X413, | ||
0X425, | ||
0X418, | ||
0X419, | ||
0X41A, | ||
0X41B, | ||
0X41C, | ||
0X41D, | ||
0X41E, | ||
0X41F, | ||
0X42F, | ||
0X420, | ||
0X421, | ||
0X422, | ||
0X423, | ||
0X416, | ||
0X412, | ||
0X42C, | ||
0X42B, | ||
0X417, | ||
0X428, | ||
0X42D, | ||
0X429, | ||
0X427, | ||
0X42A, | ||
}; | ||
|
||
Koi8UEncodingObject::Koi8UEncodingObject() | ||
: SingleByteEncodingObject { Encoding::KOI8_U, { "KOI8-U" }, KOI8U } { } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.