Kaynağa Gözat

[csv-utils] don't decode when you've encoded special chars (#5970)

* [csv-utils] don't decode when you've encoded special chars

* Update csvutils.py
version-14
Prateeksha Singh 6 yıl önce
committed by Nabin Hait
ebeveyn
işleme
d0a1565aa8
1 değiştirilmiş dosya ile 2 ekleme ve 3 silme
  1. +2
    -3
      frappe/utils/csvutils.py

+ 2
- 3
frappe/utils/csvutils.py Dosyayı Görüntüle

@@ -50,13 +50,12 @@ def read_csv_content(fcontent, ignore_encoding=False):
continue

if not decoded:
frappe.msgprint(_("Unknown file encoding. Tried utf-8, windows-1250, windows-1252."),
raise_exception=True)
frappe.msgprint(_("Unknown file encoding. Tried utf-8, windows-1250, windows-1252."), raise_exception=True)

fcontent = fcontent.encode("utf-8")
content = [ ]
for line in fcontent.splitlines(True):
content.append(frappe.safe_decode(line))
content.append(line)

try:
rows = []


Yükleniyor…
İptal
Kaydet