Also, Google Groups doesn't make it clear, but  "always show on top" option 
for a topic pins the topic, but that should only be used, in the way this 
group works, for messages that a need to be persistent ... like 
administrative messages.

/dps


On Thursday, April 2, 2020 at 4:39:55 PM UTC-7, Dave S wrote:
>
>
>
> On Tuesday, March 31, 2020 at 2:02:29 AM UTC-7, aabelyakov wrote:
>>
>> When importing data (russian characters) from a .csv-file into a table, 
>> an 
>> error occurs:
>> <class 'UnicodeDecodeError'> 'ascii' codec can't decode byte 0xd0 in 
>> position 65: ordinal not in range(128).
>>
>
> When you get this error, are you using appadmin to do the import?   It 
> appears appadmin doesn't specify the encoding, so defaults to ASCII.  In 
> 2.18.5 that's line 177 
> of [...]\web2py\applications\admin\controllers\appadmin.py.
>
> I'm not sure what the best way is to fix this, but it would be appropriate 
> to file a bug report.
>
>
>
>
>> Standalone PyDAL works fine!
>>
>> =============================================================================
>> import locale 
>> print('locale.getpreferredencoding(False) =', 
>> locale.getpreferredencoding(False))
>>
>> db.import_from_csv_file(
>> open('applications/upoweron/databases/csv/all.csv'),
>> restore=True,
>> encoding="utf-8",
>> )
>>
>> db.commit()
>>
>> =============================================================================
>> Result:
>> locale.getpreferredencoding(False) = ANSI_X3.4-1968
>>
>
> See, you specified the encoding there.
>
> /dps
>  
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/5c4967ea-6ef3-4856-934b-e8926b8ca1d8%40googlegroups.com.

Reply via email to