-
Notifications
You must be signed in to change notification settings - Fork 589
Closed
Labels
Description
How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.9.10
Steps to Reproduce
If you use this function:
https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/utils.py#L834-L854
If you use a value that contains unicode characters like this one:
Randolph Carter est obsédé par la redécouverte de la ville du coucher, la ville de ses rêves.
Expected Result
The truncation and indexes in the AnnotatedValue should be done by number of bytes and not number of characters.
Actual Result
The index range in the resulting AnnotatedValue is wrong, because it is the len() in characters and not the len in bytes.
To use the byte length one has to use something like this:
length = len(value.encode("utf-8"))
Reactions are currently unavailable