What’s the difference between utf8_general_ci and utf8_unicode_ci?

For those people still arriving at this question in 2020 or later, there are newer options that may be better than both of these. For example, utf8_unicode_520_ci. All these collations are for the UTF-8 character encoding. The differences are in how text is sorted and compared. _unicode_ci and _general_ci are two different sets of rules … Read more

What characters can be used for up/down triangle (arrow without stem) for display in HTML?

Unicode arrows heads: ▲ – U+25B2 BLACK UP-POINTING TRIANGLE ▼ – U+25BC BLACK DOWN-POINTING TRIANGLE ▴ – U+25B4 SMALL BLACK UP-POINTING TRIANGLE ▾ – U+25BE SMALL BLACK DOWN-POINTING TRIANGLE For ▲ and ▼ use ▲ and ▼ respectively if you cannot include Unicode characters directly (use UTF-8!). Note that the font support for the smaller … Read more

UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xa0′ in position 20: ordinal not in range(128)

You need to read the Python Unicode HOWTO. This error is the very first example. Basically, stop using str to convert from unicode to encoded text / bytes. Instead, properly use .encode() to encode the string: p.agent_info = u’ ‘.join((agent_contact, agent_telno)).encode(‘utf-8’).strip() or work entirely in unicode.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)