Unicode support in oslo.config

Registered by Nileshkumar Patel

Value define in oslo.config's configuration file expect strings. If user add non ASCII value in oslo.config, it will be treated as string. When non ASCII string use to perform some string operation with ASCII string, it will give unicode error.

Oslo.config has to return unicode if the data in not ASCII. We have to add new attribute to handle non ASCII in oslo.config. New attribute will encode data before return to caller.

Problem description
===================

Non ASCII string value (like vCenter Cluster name in Japanese or Chinese) for configuration parameter can be stored in file using String type. When non-ascii values are retrieved from Oslo.config, a string(s) is returned.

If Configuration parameter value is non-ascii, then the value will be of String type, instead value should be of Unicode type or return Unicode.

Hence value of the parameter needs to be converted to Unicode or it will fail in all the String operations (like comparison, concatenation etc.).

Proposed change
===============
String type will have another attribute ``encoding`` which will be default ``None`` means no encoding will be perform on return value. If the ``encoding`` type given as ``utf-8`` or ``latin-1`` then return value must be encoded using this format.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Nileshkumar Patel
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.