Commit Graph

  • 57c5949e17 Fully macroize BOM sniffing and use it for UTF-8, too. Henri Sivonen 2016-03-31 12:31:46 +03:00
  • 0370352c61 Macroize decode_to_utf16(). Henri Sivonen 2016-03-30 11:42:49 +03:00
  • 82260b71e5 Make BOM sniffing actually work. Henri Sivonen 2016-03-30 11:27:18 +03:00
  • 8d4c0a8e83 Initial attempt at BOM sniffing. Henri Sivonen 2016-03-24 17:55:35 +02:00
  • 99a2b3b3f3 Allow instantiating into previously-allocated memory instead or reset(). Henri Sivonen 2016-03-22 18:48:33 +02:00
  • 4602a0fa10 Make the C++ API compile. Henri Sivonen 2016-02-18 18:03:21 +02:00
  • 8fd06f4540 Get the C++ API closer to compiling. Henri Sivonen 2016-02-18 11:33:05 +02:00
  • a9e2d96802 Format build.rs. Henri Sivonen 2016-02-18 11:08:33 +02:00
  • 371ec8627d Make the C++ API look complete. Henri Sivonen 2016-02-18 11:02:55 +02:00
  • e551359118 Start a C++ header file (does not compile yet) Henri Sivonen 2016-02-17 22:31:45 +02:00
  • 93c2a33d57 Check buffer space after generating an NCR. Henri Sivonen 2016-02-17 12:15:48 +02:00
  • 8b3fd624b0 Add encoding constants to FFI. Henri Sivonen 2016-02-16 14:10:44 +02:00
  • d41fd2ae53 Update to rustfmt 0.3.0. Henri Sivonen 2016-02-16 11:46:23 +02:00
  • a89396c1ab Build a staticlib, too. Henri Sivonen 2016-02-10 12:20:37 +02:00
  • 1c1ae044b9 Change package name to encoding_rs and add some more Cargo.toml fields. Henri Sivonen 2016-01-29 14:10:46 +02:00
  • 8b2f33998d Use rusty-cheddar to generate a header from ffi.rs. Henri Sivonen 2016-01-29 12:25:17 +02:00
  • d00103c287 Explain why the replacement decoder never needs to return OutputFull. Henri Sivonen 2016-01-29 11:36:57 +02:00
  • cf0e47561c Test the replacement encoding. Henri Sivonen 2016-01-29 11:29:52 +02:00
  • 93f2b0e0a0 Make preparations to use rusty-cheddar. Henri Sivonen 2016-01-29 11:13:50 +02:00
  • 3398ea118c Add missing parts of the FFI. Henri Sivonen 2016-01-29 10:44:26 +02:00
  • 71b81df925 Document write_ncr(). Henri Sivonen 2016-01-28 21:29:11 +02:00
  • 14f348b530 Really, really get rid of dom_name. Henri Sivonen 2016-01-28 21:28:05 +02:00
  • b66ec4c83d Really get rid of dom_name. Henri Sivonen 2016-01-28 21:26:40 +02:00
  • 61f8378940 Get rid of the name/dom_name distinction; just use the DOM name. Henri Sivonen 2016-01-28 21:25:12 +02:00
  • ffcaabda4f Make generate-encoding-data.py write to lib.rs. Henri Sivonen 2016-01-28 21:16:32 +02:00
  • 4b40c1ac85 Rename the argument of max_utf16_buffer_length(). Henri Sivonen 2016-01-27 22:51:53 +02:00
  • cabd77f2ca Adapt single-byte decoder to the continue-rich loop style. Henri Sivonen 2016-01-27 22:44:57 +02:00
  • 7c58738b19 Implement the replacement decoder. Henri Sivonen 2016-01-27 22:41:32 +02:00
  • eb31fe4830 Test Big5 encode from UTF-8. Henri Sivonen 2016-01-27 22:26:55 +02:00
  • f6a1afede0 Test Big5 encode from UTF-16. Henri Sivonen 2016-01-27 22:20:10 +02:00
  • bfd53d5a1d Use replacement worst case in encoder tester helper. Henri Sivonen 2016-01-27 15:16:04 +02:00
  • 1daedfc77c Add a testing helper function for encoding from UTF-8. Henri Sivonen 2016-01-27 15:10:11 +02:00
  • 1b2be65615 Avoid comparing result enum for equality. Henri Sivonen 2016-01-27 15:01:07 +02:00
  • bf38510a4c Implement the UTF-16 to UTF-8 encoder. Henri Sivonen 2016-01-27 14:41:59 +02:00
  • 9912078fd9 Implement the UTF-8 to UTF-8 encoder. Henri Sivonen 2016-01-27 14:34:18 +02:00
  • af9c746e36 Remove unused "use". Henri Sivonen 2016-01-27 14:12:13 +02:00
  • 679f1f9b14 Implement the single-byte encoder. Henri Sivonen 2016-01-27 14:10:47 +02:00
  • f3687f6fb8 Implement max length methods for the Big5 encoder. Henri Sivonen 2016-01-27 13:50:43 +02:00
  • 366de58e37 Implement Big5 encoder. Henri Sivonen 2016-01-27 12:35:10 +02:00
  • 85659d6ba9 Add encoder macros. Henri Sivonen 2016-01-27 12:17:51 +02:00
  • 764037e1ff Implement ByteDestination. Henri Sivonen 2016-01-27 11:57:26 +02:00
  • 99810b0231 Add Utf8Source. Henri Sivonen 2016-01-27 11:38:08 +02:00
  • 1dac008e46 Implement Utf16Source. Henri Sivonen 2016-01-25 22:15:40 +02:00
  • 3b00083d35 Factor common test code into a module. Henri Sivonen 2016-01-25 14:41:19 +02:00
  • 402f6b4dd0 Implement encode_from_utf8_with_replacement(). Henri Sivonen 2016-01-25 14:29:39 +02:00
  • f8248ecbdb Implement write_ncr(). Henri Sivonen 2016-01-25 14:18:58 +02:00
  • 1ff4f86d53 Implement encode_from_utf16_with_replacement(). Henri Sivonen 2016-01-25 12:39:44 +02:00
  • 14650bfb96 Implement Encoding.encode_with_replacement(). Henri Sivonen 2016-01-25 12:03:34 +02:00
  • 29bb980ff5 More documentation. Henri Sivonen 2016-01-25 11:30:52 +02:00
  • 162f19e2d1 Add placeholders for all encodings. Henri Sivonen 2016-01-25 11:04:02 +02:00
  • d2ef5887c6 Generate constant for the encodings. Henri Sivonen 2016-01-23 13:57:07 +02:00
  • 57fce6da7a Switch Python code to snake_case. Henri Sivonen 2016-01-23 12:11:41 +02:00
  • e402e7fc08 Implement for_label and for_dom_name. Henri Sivonen 2016-01-23 11:52:21 +02:00
  • e8dc453623 Document Encoding::for_dom_name(). Henri Sivonen 2016-01-22 22:24:24 +02:00
  • b06fc5a0f1 Implement PartialEq for Encoding. Henri Sivonen 2016-01-22 20:16:17 +02:00
  • f02f1cfe17 Add some documentation for Encoding. Henri Sivonen 2016-01-22 19:58:22 +02:00
  • e9b96da508 Formatting. Henri Sivonen 2016-01-20 14:24:52 +02:00
  • 9ecba57414 Implement Encoding.decode() Henri Sivonen 2016-01-20 14:24:25 +02:00
  • c5ae2ef577 Avoid an intermediate slice for data tables. Henri Sivonen 2016-01-20 14:09:20 +02:00
  • b831f1f83d Fix formatting. Henri Sivonen 2016-01-20 13:49:29 +02:00
  • 776710afbf Implement Encoding::for_label_no_replacement(). Henri Sivonen 2016-01-20 13:48:37 +02:00
  • cf3d73f0ee Refactor Encoder from trait to struct to make it Sized. Henri Sivonen 2016-01-20 13:33:09 +02:00
  • b76b2c82f6 Match on enum reference in ffi. Henri Sivonen 2016-01-20 13:04:45 +02:00
  • 72f2bbf8fa Refactor Decoder from trait to struct to make it Sized. Henri Sivonen 2016-01-20 13:03:35 +02:00
  • d4c7d2649c Factor the decoder macros into a separate module. Henri Sivonen 2016-01-20 12:17:29 +02:00
  • 57e9db0314 Think through the max size cases for Big5 decoder. Henri Sivonen 2016-01-20 11:52:15 +02:00
  • 4ee7571746 Fix typo in comment. Henri Sivonen 2016-01-20 11:29:56 +02:00
  • a341e8e260 Add tests for decoding Big5 to UTF-8 and fix the bugs revealed. Henri Sivonen 2016-01-20 11:28:57 +02:00
  • 3f04ab1dae Implement decoding to UTF-8. Henri Sivonen 2016-01-18 14:23:02 +02:00
  • e179384420 Factor the (in the future unsafe) code unit writing to a single function. Henri Sivonen 2016-01-18 12:59:22 +02:00
  • 24af2766c9 Macroize the Big5 decode function. Henri Sivonen 2016-01-18 12:55:21 +02:00
  • 2825495bb5 Remove stray println! invocations. Henri Sivonen 2016-01-18 11:37:53 +02:00
  • 8370c50888 Add more test cases for Big5; fix unintentional recursion. Henri Sivonen 2016-01-18 11:34:56 +02:00
  • da7f98cedb Implement decode_to_utf8_with_replacement. Henri Sivonen 2016-01-18 11:01:50 +02:00
  • 705c3af193 Fix a typo in the ffi.rs license header. Henri Sivonen 2016-01-18 10:53:05 +02:00
  • 66ab57f53b Move the C interface to its own module. Henri Sivonen 2016-01-18 10:52:01 +02:00
  • 5565eb53cc Remove a trailing space. Henri Sivonen 2016-01-12 12:33:43 +02:00
  • b9b80eabaf Rename Underflow to InputEmpty and Overflow to OutputFull for clarity. Henri Sivonen 2016-01-12 12:32:38 +02:00
  • 5746076bdc Use an enum for *_with_replacement return values. Henri Sivonen 2016-01-12 12:27:34 +02:00
  • 9ae908b0f0 Ignore Eclipse settings. Henri Sivonen 2016-01-08 16:29:32 +02:00
  • 248264592c Start testing Big5 decoder. Henri Sivonen 2016-01-08 16:28:56 +02:00
  • 6638b81042 Explain what the handles module is about. Henri Sivonen 2016-01-08 15:01:12 +02:00
  • f0e325db8e Add Big5 data. Henri Sivonen 2016-01-08 14:56:49 +02:00
  • 8532845788 Add the Big5 decoder algorithm. Henri Sivonen 2016-01-07 14:06:28 +02:00
  • dc3b5306a1 Ignore RustDT backup files. Henri Sivonen 2016-01-07 11:53:00 +02:00
  • 99e7ad8764 Add a byte source and handles. Henri Sivonen 2016-01-07 11:52:17 +02:00
  • bb1ac195b0 Prefix UTF-16-related handles with Utf16. Henri Sivonen 2016-01-07 11:23:29 +02:00
  • 073ad55d22 Declare the handles module. Henri Sivonen 2016-01-07 11:19:36 +02:00
  • d4f3b1daeb Apply rustfmt to lib.rs. Henri Sivonen 2016-01-07 11:16:49 +02:00
  • fb9f323bc7 Remove encode* convenience methods from Encoding. Henri Sivonen 2016-01-07 10:52:09 +02:00
  • 2f41cb1334 Add Cargo.toml Henri Sivonen 2016-01-07 10:40:45 +02:00
  • efaf6a1045 Ignore Eclipse .project. Henri Sivonen 2016-01-07 10:40:20 +02:00
  • 8dec969a43 Add initial WIP for a destination object that decouples bounds checking and writing to a Unicode destination buffer. Henri Sivonen 2016-01-04 12:09:45 +02:00
  • b06422bef5 Remove copypasta from Rust project license header that is not actually accurate for this project. Henri Sivonen 2016-01-04 12:07:26 +02:00
  • 24e9341c1a Mention that the malformed sequence may have started earlier. Henri Sivonen 2016-01-04 12:06:29 +02:00
  • d21138a6a4 Add API support for signaling the length of the malformed byte sequence when decoding. Henri Sivonen 2016-01-04 12:02:33 +02:00
  • 91f9d71e17 Initial WIP draft of the API. Henri Sivonen 2016-01-04 11:57:18 +02:00
  • 7256cd5434 Add a README. Henri Sivonen 2016-01-04 11:47:04 +02:00
  • 47d9c0d815 Add .gitignore Henri Sivonen 2016-01-04 11:11:13 +02:00
  • 2dadb029b8 Add Rust-style Apache/MIT dual license. Henri Sivonen 2016-01-04 11:09:27 +02:00