We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spun off from #66, where “All configuration JSON MUST be encoded in UTF-8” is checked. And it seems to be:
$ ./ocitools generate $ iconv -f UTF-8 -t UTF-16 config.json -o config-16.json $ mv config-16.json config.json $ file config.json config.json: Little-endian UTF-16 Unicode text $ ./ocitools validate --path . FATA[0000] invalid character 'ÿ' looking for beginning of value
But I can't find Go docs on what input encodings are supported or UTF references in ocitools:
$ git grep -i utf origin/master Binary file origin/master:rootfs.tar.gz matches
The Go docs reference RFC 4627, and the RFC explains how to detect the encoding, but maybe Go doesn't support that yet? Can someone with more Go+JSON experience explain how this works?
The text was updated successfully, but these errors were encountered:
@wking my mistake, I just update #66, ocitools has not verify utf8 encoding yet. I test it locally by using https://golang.org/pkg/unicode/utf8/#Valid. It works well.
In my test, I add a Chinese word "/主目录" to CWD field in config.json and convert it to gb18030. utf8.Valid returns false.
Sorry, something went wrong.
fix opencontainers#67: verify if config is encoded in utf8
23f540e
Signed-off-by: liang chenye <[email protected]>
Successfully merging a pull request may close this issue.
Spun off from #66, where “All configuration JSON MUST be encoded in UTF-8” is checked. And it seems to be:
But I can't find Go docs on what input encodings are supported or UTF references in ocitools:
The Go docs reference RFC 4627, and the RFC explains how to detect the encoding, but maybe Go doesn't support that yet? Can someone with more Go+JSON experience explain how this works?
The text was updated successfully, but these errors were encountered: