-
Notifications
You must be signed in to change notification settings - Fork 20
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
unrecorevable error in livestatus module #33
Comments
Confirmed:
|
I know that this is not the right solution (there are more codifications than latin-1), but for your information, now I can use livestatus with thruk making the following change: --- livestatus_response.py.orig 2014-09-24 10:11:44.524597684 +0200
+++ livestatus_response.py 2014-09-24 14:13:34.885018044 +0200
@@ -184,7 +184,7 @@
else:
lines.insert(0, columns)
if self.outputformat == 'json':
- self.output = dumps(lines)
+ self.output = dumps(lines, encoding='latin-1')
else:
self.output = str(lines)
|
We should focus on utf8 only I think. It should be up to UIs to be sure On Wed, Sep 24, 2014 at 2:15 PM, David Gil [email protected] wrote:
|
Livestatus supports both utf8 and latin1 encodings. Maybe adding a module option (data_encoding set to utf8 by default) to the livestatus module like the described in the previous link, might be useful for 'latin' users and it's quite easy to implement. In fact, the decode error only ocurrs using json/python. |
Avoid future problems with database fields encoded with latin1 and other codifications. This fixes a livestatus error (shinken-monitoring/mod-livestatus#33) creating a response with fields imported with this module encoded as latin1.
I think we can implement a similiar aproach: shinken-monitoring/mod-import-mysql#7 Detect a different encoding than 'utf8' and encode/decode again to utf8 to avoid this kind of errors. What do you think guys? |
Comes from : shinken-solutions/shinken#1254
Hi,
We set Apache (Thruk) and Shinken in en_US.UTF-8, and added a comment with an accent in Thruk.
The result is a crash of the livestatus module
Maybe it is related with this issue: * shinken-solutions/shinken#628 Fix utf8 research bug in LiveStatus broker module shinken-solutions/shinken#634
The text was updated successfully, but these errors were encountered: