Changeset 8048


Ignore:
Timestamp:
Sep 7, 2018, 10:38:44 AM (13 months ago)
Author:
hectorgh
Message:

ensuring utf8 encoding when converting from sqlite to json

Location:
n4d-server-plugins/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • n4d-server-plugins/trunk/fuentes/debian/changelog

    r8025 r8048  
     1n4d-server-plugins (0.121) xenial; urgency=high
     2
     3  * Ensuring utf8 encoding when converting from sqlite to json
     4
     5 -- Hector Garcia Huerta <hectorgh@gmail.com>  Fri, 07 Sep 2018 10:37:46 +0200
     6
    17n4d-server-plugins (0.120) xenial; urgency=high
    28
  • n4d-server-plugins/trunk/fuentes/server-install-files/usr/share/n4d/python-plugins/PasswordManager.py

    r8024 r8048  
    9898                        set_perms=True
    9999               
     100                for user in self.users:
     101                        if type(self.users[user]["cn"])!=unicode:
     102                                self.users[user]["cn"]=self.users[user]["cn"].decode("utf-8")
     103                        if type(self.users[user]["sn"])!=unicode:
     104                                self.users[user]["sn"]=self.users[user]["sn"].decode("utf-8")
     105               
    100106                data=unicode(json.dumps(self.users,indent=4,encoding="utf-8",ensure_ascii=False)).encode("utf-8")
    101107                output_file=open(f,"w")
Note: See TracChangeset for help on using the changeset viewer.