helm-schema-gen
helm-schema-gen copied to clipboard
invalid character 'ÿ' looking for beginning of value
The default encoding is UTF-16 which yeilds invalid character 'ÿ' looking for beginning of value until converted into utf-8.
@sfxworks I didn't get the issue. Do you mean that when the values.yaml contains the character ÿ in the value part (in the start or anywhere) then there's some issue? I just tried the below in the values.yaml
randomValue: happÿ
anotherRandomValue: ÿay
And it worked
...
"anotherRandomValue": {
"type": "string"
},
...
"randomValue": {
"type": "string"
},
...
Could you explain some more details about what's the issue you are facing and how to reproduce it?
Sorry, I am trying to say that when I run helm-schema-gen, the values.yaml.json is rendered and formatted in UTF-16, leading to helm to wonder what encoding the schema is in and failing to parse it. Can it default to UTF-8 or be set to the format the values file is in?
Ah! Didn't know about this. I'll check it out @sfxworks ! Thanks for bringing this up
@sfxworks Could you help me in reproducing the issue? I'm not able to reproduce it. Whenever I create the values.schema.json, it gets created in ASCII format somehow
$ file -I values.yaml
values.yaml: text/plain; charset=utf-8
$ file -I values.schema.json
values.schema.json: text/plain; charset=us-ascii