Commit Graph

31 Commits

Author SHA1 Message Date
Simon Sapin 7299191fce Update to Unicode 9.0.0 2016-12-20 00:03:22 +01:00
Manish Goregaokar e4fd0e1b21 Do not further compose LVT hangul precomposed syllable blocks
Fix #11.

The algorithm for composition of Hangul Jamo is:

 - L (choseong jamo) + V (jungseong jamo) = LV (syllable block)
 - LV (syllable block) + T (jongseong jamo) = LVT (syllable block)

However, the LV and LVT syllable blocks are intermingled in the unicode
block. In particular, for each pair LV, you will first see the syllable block
LV, followed by syllable blocks for LVT for each T. The LV+T
composition was a simple addition of offsets.

Our algorithm did not ignore the LVT syllable blocks, which meant that
LVT+T would just offset further and produce an unrelated syllable block.

By ensuring that the `S_index` is a multiple of `T_count`, we filter
for only LV syllable blocks (which occur every `T_count` codepoints in
the S block)
2016-12-20 00:03:14 +01:00
Simon Sapin cd9a45ea2a Merge pull request #9 from unicode-rs/is_combining_mark
Add a `char::is_combining_mark` function.
2016-01-18 17:12:33 +01:00
Simon Sapin 5d0443bd92 Add a char::is_combining_mark function.
This is used for international domain name validation:
http://unicode.org/reports/tr46/#Validity_Criteria

> The label must not begin with a combining mark, that is: General_Category=Mark.
2016-01-15 17:49:39 +01:00
kwantam 5ea0cec111 update Cargo.toml example to correct version number 2015-08-20 11:09:55 -04:00
kwantam 9b970231cf bump to 0.1.1 2015-07-08 22:59:50 -04:00
kwantam 0c5758fe36 Merge pull request #8 from Florob/unicode8.0.0
Update to Unicode 8.0.0
2015-07-08 22:56:53 -04:00
Florian Zeitz 5f26506035 Update to Unicode 8.0.0 2015-07-08 12:46:46 +02:00
Simon Sapin 3933917cff Merge pull request #4 from unicode-rs/char_iter_alternative
Add APIs to normalize arbitrary `char` iterators rather than just `str`.
2015-04-21 20:24:00 +02:00
kwantam 3cc8effc71 bump version to 0.1.0 2015-04-21 13:56:25 -04:00
kwantam 4354885c0e Merge pull request #5 from unicode-rs/char_iter_alternative_test
Minor changes for #4
2015-04-21 13:36:03 -04:00
Alex Crichton c4445c73d6 Merge pull request #6 from unicode-rs/doc-link
Add documentation link
2015-04-21 08:15:43 -07:00
Simon Sapin 0e7791feff Remove the str module and move its content to the crate top-level.
It not just about `str` anymore, since it now also accepts iterators.
2015-04-21 09:50:49 +02:00
Simon Sapin 91011de3f9 Remove the redundant src/str.rs file. 2015-04-21 09:48:15 +02:00
Simon Sapin 2335c222c0 Add a test with an iterator. 2015-04-21 09:47:57 +02:00
Simon Sapin 1acccecfeb Use method syntax in tests. 2015-04-21 09:47:57 +02:00
Simon Sapin f2eb73d85f Remove test_casefold.
It’s not that useful, its input being all within ASCII and unaffected by normalization,
and it sets of bad example of `char.to_lowercase().next()`,
ignoring the rest of the `ToLowercase` iterator.
2015-04-21 09:42:44 +02:00
kwantam 4f6a6ca9ed Add APIs to normalize arbitrary char iterators rather than just str.
This enables not allocating memory for intermediate results
in algorithms like this part of Unicode’s [*canonical caseless matching*](
http://www.unicode.org/versions/Unicode7.0.0/ch03.pdf#G34145 ):

```rust
nfkd(default_case_fold(nfkd(default_case_fold(nfd(input)))))
```
2015-04-20 20:37:22 -04:00
Simon Sapin 7eff4cb25d Add documentation link 2015-04-20 15:56:39 +02:00
kwantam db78f43c57 logo 2015-04-17 00:14:46 -04:00
kwantam e0d33a8661 make load_properties() tolerate whitespace
This commit imports update to regexes in `load_properties()`,
d25c39f86568a147f9b7080c25711fb1f98f056a in rust-lang/regex

Does not result in any changes to tables.rs, but could if
published tables are updated in the future.
2015-04-16 16:11:04 -04:00
kwantam c7a8bcfdc5 make sure unicode.py puts out optimized tables 2015-04-15 20:04:41 -04:00
kwantam 3d02ca9e05 tiny doc touch 2015-04-15 16:03:36 -04:00
kwantam 7a49d257eb add Unicode norms test suite; bump to ver 0.0.3 2015-04-15 15:40:06 -04:00
kwantam 0a336e55e4 fix description: UAX#15, not UAX#11 2015-04-14 22:02:06 -04:00
kwantam d433de79ce update Cargo.toml 2015-04-14 21:55:05 -04:00
kwantam 92be203f2a add readme 2015-04-14 21:40:45 -04:00
kwantam 462dd30d22 working build 2015-04-14 21:39:26 -04:00
kwantam 933f988530 add tablegen script and tables.rs 2015-04-14 21:22:32 -04:00
kwantam 3f237be5ec add license info, .travis.yml, Cargo.toml 2015-04-14 19:33:17 -04:00
kwantam 3f03c93a2f initial commit 2015-04-14 16:47:28 -04:00