factor common char encoding into main Target; version set to 4.4

I agree with @ericvergnaud here. The only thing to verify is the method behaves properly when the input `toolVersion` has the value `"4.4"` (which it will unless you do something special in the code generation templates to transform the value to something else, e.g. set a custom `format` and handle it in the `PythonStringRenderer`).