Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
8ac9494c
Commit
8ac9494c
authored
Apr 04, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relax restriction that text can't contain NUL characters.
parent
a6aa9d6a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
encoding.md
doc/encoding.md
+7
-4
No files found.
doc/encoding.md
View file @
8ac9494c
...
...
@@ -55,10 +55,13 @@ from C++, where the `bool` type takes a whole byte.
The built-in blob types are encoded as follows:
*
`Data`
: Encoded as a pointer, identical to
`List(UInt8)`
.
*
`Text`
: Like
`Data`
, but the content must be valid UTF-8, the last byte of the content must be
zero, and no other byte of the content can be zero. Note that the NUL terminator is included in
the size sent on the wire, but the runtime library should not count it in any size reported to
the application.
*
`Text`
: Like
`Data`
, but the content must be valid UTF-8, and the last byte of the content must
be zero. The encoding allows bytes other than the last to be zero, but some applications
(especially ones written in languages that use NUL-terminated strings) may truncate at the first
zero. If a particular text field is explicitly intended to support zero bytes, it should
document this, but otherwise senders should assume that zero bytes are not allowed to be safe.
Note that the NUL terminator is included in the size sent on the wire, but the runtime library
should not count it in any size reported to the application.
## Enums
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment