Bug #3183
smwingsd UTF-8 decode problems
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-httpd-admin | |||
Target version: | v6.6 | |||
Security class: | Resolution: | |||
Affected version: | v6.6-final | NEEDINFO: | No |
Description
If DB contains UTF-8 encoded data, smwingsd fails to decode it correctly.
Steps to reproduce- In Organizations contact page set some words with special chars
- Save then reload the page (browser F5 or Ctrl+R key)
- It is only a visualzation problem, data is saved correctly in DB
- If
smwingsd
is stopped the value is displayed correctly# stop smwingsd
Thanks to Kristian Malvander for pointing it out!
Associated revisions
smwingsd: decode to UTF-8 on getprop and gettype calls. Refs #3183
db_getrprop() and db_gettype() functions from the esmith::db module
return unencoded strings.
This patch checks if a string has been decoded and tries to decode to
UTF-8.
The recent db_preparejson() function already decodes to UTF-8 and does
not need the check.
History
#1 Updated by Davide Principi about 6 years ago
- Description updated (diff)
#2 Updated by Davide Principi about 6 years ago
- Description updated (diff)
#3 Updated by Giacomo Sanchietti about 6 years ago
- Description updated (diff)
#4 Updated by Davide Principi about 6 years ago
- Status changed from TRIAGED to ON_DEV
- Assignee set to Davide Principi
- % Done changed from 20 to 30
#5 Updated by Davide Principi about 6 years ago
- Status changed from ON_DEV to MODIFIED
- Assignee deleted (
Davide Principi) - % Done changed from 30 to 60
MODIFIED
see the commit message for details
#6 Updated by Davide Principi about 6 years ago
- Status changed from MODIFIED to ON_QA
- % Done changed from 60 to 70
In nethserver-testing:
nethserver-httpd-admin-1.4.1-1.1.g96a6930.ns6.noarch.rpm
#7 Updated by dz0 0te about 6 years ago
- Assignee set to dz0 0te
#8 Updated by dz0 0te about 6 years ago
- Status changed from ON_QA to VERIFIED
- Assignee deleted (
dz0 0te) - % Done changed from 70 to 90
System and Package Version installed
VM KVM - Clean install of Nethserver 6.6 fully updated
Package Installed: nethserver-httpd-admin.noarch 0:1.4.0-1.ns6
Other Package installed: File server,MySQL server,Web server
Test Original Problem
In Organization contacts page, set "ϖ ξ Ω Σ Π Ψ π" in: Company,City,Dep.,Address
Saving and reloading page shows stange char.
Install Updated Package
yum --enablerepo=nethserver-testing update nethserver-httpd-admin-1.4.1-1.1.g96a6930.ns6
Test Results after update
Reloading Organization contacts, show the correct value: "ϖ ξ Ω Σ Π Ψ π"
Note
...
#9 Updated by Davide Principi about 6 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
In nethserver-updates:
nethserver-httpd-admin-1.5.0-1.ns6.noarch.rpm