Skip to content
New issue

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

Encoding problem assigning a unicode string with non ASCII characters to a message field #7

Open
asulis opened this issue Jul 31, 2014 · 0 comments
Labels

Comments

@asulis
Copy link

asulis commented Jul 31, 2014

Description

An exception is raised if a unicode string is assigned to a message field, when the string contains non-ascii characters and the validation is STRICT

How to reproduce

Create a pid segment and try to assign to PID.5.1 field (surname) the following string:

pid = Segment('PID', validation_level = VALIDATION_LEVEL.STRICT)
pid.pid_5.pid_5_1 = u'mandà'

What happens

It raises

'ascii' codec can't encode character u'\xc0' in position 2: ordinal not in range(128)

What should happen

The assignment should be valid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant