Jeroen van Rijn
e7dbabf668
core:os -> core:os/old && core:os/os2 -> core:os
2026-02-09 15:50:21 +01:00
Jeroen van Rijn
8ed264680b
Remove all core:os imports from JS targets
...
Fix `local_tz_name` on FreeBSD.
2026-02-09 15:07:27 +01:00
Jeroen van Rijn
02477b2526
eprintf
2026-02-08 12:44:06 +01:00
Jeroen van Rijn
e094de5874
Add loc := #caller_location to read_entire_file
2026-02-08 12:44:05 +01:00
Jeroen van Rijn
f63c209478
Convert core:encoding/hxa
2026-02-08 12:42:26 +01:00
Jeroen van Rijn
304f22c8af
core:os -> core:os/os for CSV, INI, and XML
...
Also had to vendor `core:encoding/ini` into `core:os/os2` for the user directories on *nix,
as it used that package to read `~/.config/user-dirs.dirs`, causing an import cycle.
2026-02-08 12:42:24 +01:00
Isabella Basso
56445dff97
encoding/xml: pass allocator on destroy
2026-01-25 21:33:23 -03:00
Jeroen van Rijn
3f8a32aeb9
Merge branch 'master' into xmlcomment
2026-01-22 11:47:23 +01:00
gingerBill
0de3d872d1
Keep -vet happy
2026-01-19 19:32:41 +00:00
gingerBill
85b3251105
Remove the nbsp change, as it is not necessary
2026-01-19 19:30:37 +00:00
gingerBill
fddc732869
Escape non-breaking space (0xa0) to
2026-01-19 18:17:13 +00:00
Jeroen van Rijn
27ac0ebc37
Merge pull request #6145 from odin-lang/bill/html-escape
...
Update `core:encoding/entity`
2026-01-18 13:37:45 +01:00
gingerBill
ba20bfa5f4
Update generated.odin
2026-01-18 12:17:28 +00:00
gingerBill
871cedc701
Keep -vet happy
2026-01-18 11:47:51 +00:00
gingerBill
23198f7917
Move html escaping calls and fix existing generator
2026-01-18 11:45:40 +00:00
rykad
454f75cb22
core:encoding/base64: add support for url variant
2026-01-17 22:26:25 +00:00
StudebakerGuy
14d6371058
Comment includiing -- at end
...
Comments are incorrectly including -- a the end. This was due
to the comment slice being returned 2 charachters too long.
2026-01-07 19:28:44 -05:00
StudebakerGuy
dc37ff5036
Comments before first emlement not being captured
...
The xml library was not correctly detect that a comment occured
before the first element. This addresses the issue, but the comment
incorrectly includes --.
2026-01-07 19:28:44 -05:00
Jeroen van Rijn
b6ea6f7a12
Merge pull request #5882 from IllusionMan1212/custom-json-marshalling
...
encoding/json: custom json (un)marshalling
2026-01-01 16:07:01 +00:00
dozn
8fea2b783c
[encoding/json] Allow Unmarshalling to rune
...
Fixes https://github.com/odin-lang/Odin/issues/6061
2025-12-30 18:10:07 -08:00
dozn
589dbbddd2
[encoding/json] Fix Escapes When Marshalling
...
Fixes https://github.com/odin-lang/Odin/issues/6060 and https://github.com/odin-lang/Odin/issues/6075
The boolean "true" was setting `html_safe` instead of `for_json`.
Chalk one up for the "use enums instead of booleans" crowd.
2025-12-30 17:02:06 -08:00
dozn
affaefc13a
Moved first_iteration up a couple lines so it makes sense readability-wise.
2025-12-30 04:42:06 -08:00
dozn
ba68d75c6f
Add JSON5/SJSON Comments When Marshalling
...
Allows user-facing JSON5/SJSON to have comments explaining field usage.
`json.Marshal_Options.pretty` must be enabled since we only use single-line comments (not to mention it wouldn't be terribly useful without `pretty` set anyways).
We don't escape anything, so `\n` will display as "\n", but you're still able to enter in a proper newline character and it'll be displayed on multiple lines.
2025-12-29 12:23:54 -08:00
Laytan
852ea91cdb
Merge pull request #6078 from BigBoyBarney/json-arrays
...
Fix standard json parsing / unmarshalling issue for pure arrays
2025-12-29 15:53:51 +01:00
Sylphrena
6441fc09e0
Fix standard json parsing / unmarshalling issue for pure arrays
2025-12-29 15:35:34 +01:00
Zoltán Kéri
d802a4e9fa
encoding/base32: Fix padding validation for malformed input
...
Fix a bug where padding characters in the middle of input were
not detected when there was no trailing padding.
The "verify no padding in middle" check was inside `if
padding_count > 0`, so inputs like "MZ===YTBMZXW6YTB" would
incorrectly pass validation.
Test case added for this edge case.
2025-12-27 04:30:37 +01:00
StudebakerGuy
ab74b8283d
Address issue identifying of CDATA
...
The XML library wasn't identifying CDATA and skipping over it.
This was found when CDATA contained a <. This patch addresses
that issue.
2025-12-23 09:35:09 -05:00
Jeroen van Rijn
83fb7ba952
Make custom JSON (un)marshalers more like core:fmt's
2025-12-10 17:54:12 +01:00
Hisham Aburaqibah
72d65603eb
encoding/json: error handling for custom (un)marshallers
2025-12-02 22:46:35 +02:00
IllusionMan1212
4b9e15786d
encoding/json: custom json (un)marshalling
2025-12-02 22:46:31 +02:00
Franz Hoeltermann
cd4bec0007
Increase base64 decoding table size to 256, preventing out of bounds reads
2025-11-22 12:54:36 +01:00
Neirokan
8cdf7ade48
encoding/json: clone unquoted strings
2025-11-06 19:24:58 +03:00
gingerBill
e5153a937b
Merge pull request #5859 from odin-lang/bill/change-license
...
Change Odin's LICENSE to zlib from BSD 3-clause
2025-11-04 13:53:13 +00:00
Laytan
9893a0eaea
encoding/cbor: fix epoch tag with small values
2025-11-03 20:33:17 +01:00
gingerBill
842cfee0f3
Change Odin's LICENSE to zlib from BSD 3-clause
...
This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
2025-10-28 14:38:25 +00:00
Jeroen van Rijn
236111864e
Link doc lines to source specifications.
2025-10-10 18:29:52 +02:00
Jeroen van Rijn
ece213afca
Render examples.
2025-10-10 12:24:28 +02:00
Jeroen van Rijn
7a9ea3ee6d
Further overhaul of package line comments.
2025-10-09 23:05:29 +02:00
Jeroen van Rijn
288b45f50c
package lines for encoding
2025-10-09 16:34:18 +02:00
Jeroen van Rijn
248b0fe9e1
More package lines
2025-10-09 16:11:33 +02:00
Jeroen van Rijn
aec7d6480b
Package lines for base32, move its tests to tests"
2025-10-09 15:27:53 +02:00
Courtney Strachan
69ad94d8a8
Followup fix to #4895
2025-10-05 19:22:04 -07:00
Courtney Strachan
6de2d6e8ca
Merge branch 'odin-lang:master' into master
2025-10-06 02:41:44 +01:00
gingerBill
d3b8770318
Add #+test to base32_test.odin
2025-09-28 20:48:13 +01:00
gingerBill
7642e0a0e0
Require @(init) and @(fini) to be proc "contextless" ()
2025-08-08 12:10:01 +01:00
gingerBill
af3184adc9
Change is_utf16 field to encoding and use an enum
2025-08-05 15:12:54 +01:00
gingerBill
ae02d3d02d
Begin supporting string16 across the core library
2025-08-02 11:55:16 +01:00
Jeroen van Rijn
179e5b8835
Fix #4705
...
Allocate `doc.tokenizer`, and free it in `destroy`.
2025-06-09 15:09:04 +02:00
Feoramund
b7de15caa3
Clarify strconv.append_* to strconv.write_*
2025-06-05 16:56:00 -04:00
Laytan Laats
9eefa2006e
encoding/cbor: support simd vectors
2025-06-04 22:00:02 +02:00