Python Forum
How to convert unicode to koi8-r?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to convert unicode to koi8-r?
#3
(Feb-21-2019, 04:18 PM)snippsat Wrote: I don't see a reason why you should mess with this at all.
Try avoid encoding/decoding at all,let DB handle if needed.
If example test sqlite3 with Python 3.7.
There is no need to do anything,Python 3 text(Unicode default) will go in out DB without any problems.

Thanks you for the answer.
In your case the text will actually be placed in the database, but it will take up twice the amount of disk space. Therefore, reading and writing data from database will be twice as slow. I can set a more economical charset in MariaDB to avoid unnecessary costs. I want to prepare data in Python (excluding only unsupported koi8-r characters), so that they are written to the database as completely as possible.
Reply


Messages In This Thread
RE: How to convert unicode to koi8-r? - by snippsat - Feb-21-2019, 04:18 PM
RE: How to convert unicode to koi8-r? - by AlekseyPython - Feb-22-2019, 08:33 AM
RE: How to convert unicode to koi8-r? - by DeaD_EyE - Mar-04-2019, 08:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert Int Value bigger 256 to Unicode lastyle 4 2,782 Mar-19-2020, 11:48 AM
Last Post: lastyle
  clean unicode string to contain only characters from some unicode blocks gmarcon 2 4,011 Nov-23-2018, 09:17 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020