Commit 2a06a89
committed
59: add support for \uXXXX escapes within string literals
This is in response to edn-format/edn#65 .
This is an extension as string literals as currently documented
do not specify support for \uXXXX escapes.
https://github.com/edn-format/edn/tree/a51127aecd318096667ae0dafa25353ecb07c9c3
Notes:
- Unicode escape must begin with "\u". This is case sensitive "\U" will
be rejected.
- "\u" must be followed by exactly four hex digits taken from this set:
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
- The digits are not case sensitive.
- Each such Unicode escape encodes a single 16-bit Java char. Since Java
uses UTF-16 internally (for historical reasons) code points beyond
the basic multilingual plane as a pair of unicode escapes.
(see also "surrogate pairs")1 parent 89a7e56 commit 2a06a89
2 files changed
Lines changed: 47 additions & 0 deletions
File tree
- src
- main/java/us/bpsm/edn/parser
- test/java/us/bpsm/edn/parser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
380 | 397 | | |
381 | 398 | | |
382 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
369 | 399 | | |
370 | 400 | | |
371 | 401 | | |
| |||
0 commit comments