[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Putting Unicode characters in JSON

On Fri, Mar 23, 2018 at 11:25 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> Chris Angelico <rosuav at gmail.com> writes:
>> On Fri, Mar 23, 2018 at 10:47 AM, Steven D'Aprano
>> <steve+comp.lang.python at pearwood.info> wrote:
>> > On Fri, 23 Mar 2018 07:09:50 +1100, Chris Angelico wrote:
>> >> Reconfigure your MySQL database to use UTF-8. There is no reason to
>> >> use Latin-1 in the database.
>> >
>> > You don't know that. You don't know what technical, compatibility,
>> > policy or historical constraints are on the database.
>> Okay. Give me a good reason for the database itself to be locked to
>> Latin-1.
> That's a loaded question. If the database maintainers have a technical,
> compatibility, policy, or historical reason that constrains an existing
> database to a specific character set, then that is a good reason for
> them.
> Is it a good reason to create a new, independent database using Latin-1
> character set? No. But that's implicit in the fact it's an existing
> constraint, because it's an existing database.
> Is it a reason likely to convince you? Or convince me? No. But that's
> irrelevant because they don't have any need to convince us of the
> goodness of their reason to keep that encoding :-)

I happen to know that many deployments of MySQL have Latin-1 as the
default character set. Is *that* a good enough reason for you? Because
it isn't for me.

There is NOT always a good reason for a suboptimal configuration. Thus
I stand by my recommendation to reconfigure the database as first
option, with other options *following* it in my original email.