Add config to specify encoding for Macro Strings
Open
package:ffigen
type-enhancement
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
Macro Strings are considered as Utf8 by default, but we have no way to know the encoding used.
E.g the Linux POSIX API uses Extended ASCII in their macro strings.
We should add a config to let the user specify the encoding to use.
Perhaps something like this -
```yaml
macros:
...
encoding:
- 'TXIP_.*': ascii # options
```
We should support these options at very least - `ascii`, `utf8`(default).
Another config option could be `raw` which generates a `Uint8List` instead of a String.
Contributor guide
Assessment
This issue has not been assessed yet.