: mysql, sql, query-optimization. Weapon damage assessment, or What hell have I unleashed? Just explain to him that UTF-8 is the default for web traffic. Any hints? Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. MySQL will try to convert data in Database encoding before converting it to column encoding. I get this message for every ALTER/MODIFY command: . All data in the database is already converted (my tables where first created in latin1). very much appreciated. You can specify a default character set per MySQL server, database, or table. The defaults for a database will get applied to new tables, and the defaults for a table will get applied to new columns. twitter_handle - charset ascii, screen_name - latin1! The most important reason why you should support Unicode is that you shouldn't make unnecessary assumptions about user input. WebManipulating utf8mb4 data from MySQL with PHP. e.g enum(taxonomy,edited,grouped,un-grouped) How to fix for this? MySQL: Migrating database with utf8 collation and charset but latin1 data to new full UTF-8 database, mysqldump shows pairs of utf8 chars when dumping a utf8 database, convert default charset utf8 tables to utf8mb4 mysql 5.7.17, select MAX() from MySQL view (2x INNER JOIN) is slow. 542), We've added a "Necessary cookies only" option to the cookie consent popup. Just use UTF-8 everywhere. Any help on this will be greatly appreciated. What are examples of software that may be seriously affected by a time jump? Due to the amount of multi-byte information coming in, we now decide we need to switch to utf8 as the character set for the database and client. I think beyond the technical question, your boss may not have the time to keep up to date on current standards. Is it safe to just switch these to utf8 too, without converting? : mysql, sql, query-optimization. If it were only that simple. The open-source game engine youve been waiting for: Godot (Ep. How to be Agile when it comes to database design? Design Let's assume we were using latin1 for the database and client character set. Used your script, but seems like there is a character limit to it. When I see an ascii column, I know for sure no West European characters are allowed; just the plain old a-zA-Z0-9 etc. all garbled chars are now gone, and i did not even have to change any part of the script. Later UTF-8 (so-called UTF8mb4) specifications allow up to 4 bytes per code point. As stated by Quassnoi, MyISAM won't let you create an index on a column of more than 1000 bytes. Not the answer you're looking for? What I usually find in schemes are columns which are either utf8 or latin1. Should Latin-1 be used over UTF-8 when it comes to database configuration? . Searching for Mnchhausen on the site returned 0 results ( the correct number of matches). 21c |
MySQL8.0Ctrl + Alt + DeleteMySQL8.0MySQL8.0 Find centralized, trusted content and collaborate around the technologies you use most. MySQL with utf8mb4 support). I get this error when working with some of my data: Warning (Code 1366): Incorrect string value: \xFCrttem for column name at row 1. select unhex(426164656E2D57FC727474656D626572672C2044452C204445) with_fc / 3. ordenados por distancia Levenshtein But how to know which these characters are \xD1\x80\xD0\xB5\xD0\xB3? In other words, even ASCII and Latin-1 allow you to completely break your input if you assume it's all just printable text! The post below is a long yet detailed account of my experience. MariaDB 10.6.1 changed the utf8 character set by default to be an alias for utf8mb3 rather than the other way around. This article was indeed helpful. I was hoping for a process that I could apply to an online database, and luckily I found some good notes by Paul Kortman and fabio, so I combined some of their ideas and automated the process for my site. To learn more, see our tips on writing great answers. Web. utf-8 show variables like'character_set_%'; 1 mysql> SHOW VARIABLES LIKE 'character_set_%'; Use utf8mb4 instead, which is a proper implementation of the standard. For simple strings like numerical dates, my decision would be, when performance is concerned, using utf8_bin (CHARACTER SET utf8 COLLATE utf8_bin). Utilizar la indexacin de texto completo para encontrar cadenas similares/contenidas. By default, the character set is now utf8. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. That saved a Production issue(that encoding hell) for us.! Seeing these strange characters sequences everywhere scared me enough to look into the problem a bit more. Over the years, I changed the default to utf8_general_ci for new columns, but existing tables and columns werent changed. ALTER TABLE.. ADD INDEX `myIndex` ( column1(15), column2(200) ); Thanks for contributing an answer to Stack Overflow! . Unicode is certainly difficult, and the UTF-8 encoding has a couple of inconvenient properties. Surface Studio vs iMac Which Should You Pick? java/hibernate latin1 UTF-8 rotebhlstr DB cm90ZWL8aGxzdHI=rotebhlstr ^ THANKS! How does Repercussion interact with Solphim, Mayhem Dominus? Thanks for this very informational post although I have some problems that I can not fix with your guidelines. Unfortunately, we've mangled the data. latin1, AKA ISO 8859-1 is the default character set in MySQL 5.0 utf8 encodes ASCII as single character true; by MySQL and its engines do not necessarily follow. $colDefault = ; Ok that raises maybe a silly question :) but some columns have to be over 1000 characters. That entirely depends on your data set, the processing power of the machine, etc. don't treat unicode as some irrelevant frivolous thing that only mischievous nerds care about. It doesn't support Hebrew, @qwertymk. Required fields are marked *. There are almost no differences between ascii and latin1. Is email scraping still a thing for spammers. FROM MyTable en.wikipedia.org/wiki/Unicode_control_characters, The open-source game engine youve been waiting for: Godot (Ep. No translation needed when importing/exporting data to UTF8 aware components (JavaScript, Java, etc). A character set is some defined set of writeable glyphs. And since ASCII is a subset of UTF8, just use UTF8 even then. TEXT, etc) into its associated BINARY type (BINARY vs. VARBINARY vs. BLOB). It was in size of field TEXT = 64Kb, MEDIUMTEXT = 16Mb, truncating to 64Kb was breaking last character. Since his stance is not completely out to lunch, just out-dated, respect his position when discussing this matter (and you need to remember to discuss, not argue), and try to work through concerns he has with regards to UTF-8. The debug logs from the search page showed the following SQL query being used: However, none of the results actually contained Mnchhausen for the city. = If you have utf8 client, latin1 database and utf8 columnt, then text data can be lost. Character Set, MySQL 5.7 latin1, MySQL 8 utf8mb4 . Im using MediaWiki for a few sites as well, so I may have to try it out soon! WebYou need to do two things. WebTwo different character sets cannot have the same collation. Will you handle a NUL in the middle of a string? Latin-1 adds a soft hyphen that indicates word break opportunities, but is otherwise invisible. For that case, you may want to do something like this after the ALTER TABLE command: sqlExec($targetDB, UPDATE `$tableName` SET `$colName` = TRIM(TRAILING 0x00 FROM `$colName`), $pretend); just to let you know, The best answers are voted up and rise to the top, Not the answer you're looking for? Heres a representation of the character in both encodings: UTF-8 encoding turns our , represented as 0xE3 in latin1, into two bytes, 0xC3A3 in UTF-8. Yeah. Seems the problem was not in charset or collation! Thanks, Hm, line 201 of the current script doesnt have any code: https://github.com/nicjansma/mysql-convert-latin1-to-utf8/blob/master/mysql-convert-latin1-to-utf8.php#L201, Would you mind opening a Github issue? 13c |
Blog |
WebCan'JDBC for MySQLlatin1,mysql,jdbc,utf-8,encode,latin1,Mysql,Jdbc,Utf 8,Encode,Latin1,JDBCforMySQLlatin1 Web. utf-8 show variables like'character_set_%'; 1 mysql> SHOW VARIABLES LIKE 'character_set_%'; is there a chinese version of ex. In any case, latin1 is not a serious contender if you care about internationalization at all. SET character_set_xxx=utf8mb4character_set_systemcharacter_set_filesystemValueutf8Mysql as in example? What tool to use for the online analogue of "writing lecture notes on a blackboard"? Since the max length of a key is 1000 BYTES, if you use utf8, then this will limmit you to 333 characters. Rails application - how to optimize/reduce database calls when iterating over a collection. See Adam Hooper's Explanation for more detail. Like maybe the user's bio or an event description. are patent descriptions/images in public domain? To learn more, see our tips on writing great answers. Can patents be featured/explained in a youtube video i.e. This would prevent any adverse effects with other code that expects database charsets to be utf8 while still being sort of binary. I am not an expert, but I always understood that UTF-8 is actually a 4-byte wide encoding set, not 3. And as I understand it, the MySQL implementat Some other folks are reporting issues on Windows here: http://bugs.mysql.com/bug.php?id=30131. In Oracle you can't have a different character set per column, wheras in MySQL you can, so may be you can set the key to latin1 and other columns to utf8. I modified fabios script to automate the conversion for all of the latin1 columns for whatever database you configure it to look at. Does Cosmic Background radiation transmit heat? The tiny difference between 1741668352 abd 1810874368 is probably due to the random nature of how you build one table from the other. Can a VGA monitor be connected to parallel port? Please be careful when using the script and test, test, test before committing to it! Unless specified otherwise, latin1 is the default character set in MySQL. Is there a better alternative solution? if ($col->COLUMN_DEFAULT !== null) { Utilizacin de la Esfinge motor de bsqueda, con PHP. What's the difference between UTF-8 and UTF-8 with BOM? Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. The intereaction between character-set-client, character-set-server, character-set-connection, character-set-results is a long article in the MySQL In practice this is only a problem for rare Chinese characters, if that really matters to you. This is a good thing in terms of non-latin character support, but if youre upgrading from an older database you may run into a lot of character encoding problems. When doing searching, you could also strip all composing characters from the text, but this may substantially change their meaning in some languages. @Ross Smith II, Point 4 is worth gold, meaning inconsistency between columns can be dangerous. To begin with the answer, it doesn't matter, how your server is configured. varchar(20) CHARACTER SET latin1 COLLATION latin1_bin: 15ms. This site https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html is experiencing technical difficulty. Today my database character set and collation is set to latin1. @Darkhog: Latin1 is indeed not specific for English, but it is essentially restricted to west-European alphabets. And should I really solve that or may latin1 be enough? WebIt will therefore convert your mis-encoded UTF-8 data (which it treats as latin1-encoded data) into UTF-8-encoded data, so that you end up with data that is double-UTF-8-encoded. So I though the script should fail on these columns. If you go with LATIN1/ISO-8859-1 you risk the data being not properly stored because it doesn't support international characters so you might run into something like the left side of this image: If you go with UTF-8, you don't need to deal with these headaches. Was Galileo expecting to see so many stars? Connect and share knowledge within a single location that is structured and easy to search. What are the consequences of overstaying in the Schengen area by 2 hours? Current best practice is to never use MySQL's utf8 character set. Use utf8mb4 instead, which is a proper implementation of the standard. Now the data looks fine when viewed from a utf8 client. For example, MySQL must reserve 30 bytes for a CHAR(10) CHARACTER SET utf8 column. DML ,. If you allow users to post in their own languages, and if you want users from all countries to participate, you have to switch at least the tables containing those posts to UTF-8 - Latin1 covers only ASCII and western European characters. Through resolving the issue, I learned a lot about the complexities of supporting international character sets in a LAMP (Linux, Apache, MySQL, PHP) environment. We ran into this issue converting a very large EE 1.x database for use in EE 2.x and this did the trick. java/hibernate latin1 UTF-8 rotebhlstr DB cm90ZWL8aGxzdHI=rotebhlstr ^ character_set_server latin1 utf-8 Misc |
Does With(NoLock) help with query performance? MySQL defines the character set at 4 different levels for the structure of data. Can't do those in Latin1 without extensive work), but they will take a bit more time. If you want the full UTF-8 4-byte character encoding, you need to use utf8mb4_unicode_ci encoding for your MySQL database/tables. See. I.e. ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near all, Is it safe to change the CHARACTER SET of the enum to utf8 instead? ;-), @PaloEbermann Embedded NUL characters means your data is a binary blob, not just a string. . Create Table: CREATE TABLE `sometable` ( `name` varchar (2096) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY Note that in utf8mb4, characters have a variable number of bytes. Otherwise, MySQL must reserve three bytes for each character in a CHAR CHARACTER SET utf8 column because that is the maximum possible character length. Web1. Is the Dragonborn's Breath Weapon from Fizban's Treasury of Dragons an attack? check the conversion tables to confirm. We are aware of the issue and are working as quick as possible to correct the issue. , . Yeah, so much confusion around that! @ Bjrn F Or you started with 4.1 (or later) and "latin1 / latin1_swedish_ci" and failed to notice that you were asking for trouble. Old versions of MySQL, and old versions of mostly everything, dealt much better with the older Latin1/ISO-8859-1(5) than UTF8. Additional issues can appear with applications that display the natural encoding of the column (such as phpMyAdmin): they show the strange character sequences as seen above, instead of UTF-8 decoded characters. See also: MySQLs character sets and collations demystified, > For example, if you have CHAR(10) CHARSET utf8, then each such value will take exactly 30 bytes, regardless of content, well, you asked for a fixed size column, so you got a fixed size column, and as it is fixed size it needs to be big enough to store 10 3 byte utf8 sequences up front. I had updated a note in the README for the script: https://github.com/nicjansma/mysql-convert-latin1-to-utf8/commit/4f10abf9599e1c8979c5ee515c8d6dd8d29cb306. Disamping itu, ketika melakukan join table dan character set yang digunakan berbeda, misal latin1 dan utf8, maka MySQL akan mengkonversi salah satunya, yang akibatnya index dari tabel tersebut TIDAK dapat digunakan. For anything else? Nic is a software developer at Akamai building high-performance websites, apps and open-source tools. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. 12c |
WebUse -Dfile.encoding=utf-8 as parameter to the JVM (can be configured in catalina.bat). I've never seen half of those. 19c |
Consider this: http://bugs.mysql.com/bug.php?id=4541#c284415. Planned Maintenance scheduled March 2nd, 2023 at 01:00 AM UTC (March 1st, How to convert control characters in MySQL from latin1 to UTF-8? Additionally, the script will only update appropriate text-based columns. Thanks for this Nic I am using Media Wiki and they are actually abandoning utf8, and going binary. 4 Answers Sorted by: 23 UTF8 Advantages: Supports most languages, including RTL languages such as Hebrew. Speaking of "wasted space" - you can't realistically call important data a waste, can you? Once again thanks for sharing this with us. is false. What are the advantages/disadvantages between using utf8 as a charset against using latin1? Current best practice is to never use MySQL's utf8 character set. MySQL character set mysql status . WebMySQL 4.1 introduced the concept of "character set" and "collation". You guys take the good stuff and throw away the rest! After you run the script against your temporary database, check the information_schema tables to ensure the conversion was successful: As long as you see all of your columns in UTF8, you should be all set! MySQL 1MySQL. Some Chinese characters and some Emoji, need 4 bytes, so utf8mb4 is a better choice for them. As for the error, you probably have a key or index field with more than 333 characters, the maximum allowed in MySQL with UTF-8 encoding. I have a table in utf8 with > 80M records and one of the columns (char(6) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL) can contain just latin symbols ([a MySQLLatin1gbkutf8 1root(root>mysql -u root p,root) Learn more about Stack Overflow the company, and our products. Co-Chair of W3C Web Performance Working Group. Find centralized, trusted content and collaborate around the technologies you use most. The same character set can have multiple distinct encodings. PHP Notice: Undefined variable: res in /usr/home/bbking/mysql-convert-latin1-to-utf8.php on line 201, and the tables dont change; either in encoding nor in content. In this case, we would specify: If we dont specify the length, default and NOT NULL, the columns arent the same as before the conversion. Why don't we get infinite energy from a continous emission spectrum? Regardless, please open a Github issue if you think theres an problem here: https://github.com/nicjansma/mysql-convert-latin1-to-utf8/issues. In utf8, it takes 6 bytes (plus length). SQL. Storage space increase, however, will be different depending on the language your data is in. I know there are rows with So in the database, so the query wasnt working 100% correctly. Storing and retrieving from the city column is binary-safe that is, MySQL doesnt modify the data PHP sends it via the mysql extension. This works for me: Mostly characters are not a problematic as the default character set used by browsers and tomcat/java for webapps is latin1 ie. And should I really solve that or may latin1 be enough? Does it have the sense to convert this column into latin1? Thank you, very much! Getting back to the Mnchhausen Problem, one of the things I initially checked was what character set PHP was talking to MySQL with: Knowing the character is represented differently in latin1 versus UTF-8 (see below), and taking a wild stab in the dark, I tried to force my PHP application to use UTF-8 when talking to the database to see if this would fix the issue: Voila! it takes 1 byte to store a character in latin1 and 3 bytes to store a character in utf-8 - is that correct? We did an application using Latin because it was the default. But later on we had to change everything to UTF because of spanish characters, not in m = Looks like the character encoding of the email sent out (from whatever email client theyre using) might be specified improperly, and possibly, SquirrelMail notices the error and corrects it. Could you please comment on the time that we can expect for this activity on per table basis in case the amount of data already present in the table is huge? It can be an appropriate choice when you will be storing known safe values (such as percent-encoded URLs). The above DEFAULT ' is a single apostrophe, not a double apostrophe? My websites visitors saw proper UTF-8 characters on the website even though the MySQL column was latin1. You'll need to shorten the column length of some character columns or shorten the length of the index on the columns using this syntax to ensure that it is shorter than the limit. When should a database table use timestamps? Interesting! By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. If you find bugs or want to contribute changes, please head there. What is the best way to deprotonate a methyl group? thousands of devs, including me, fall for the trap. Can a VGA monitor be connected to parallel port? Weblatin1_swedish_ciUTF-8fuballfuball. ), and latin1 column being all the rest (passwords, digests, email addresses, hard-coded Setting the default character set and collation is completely safe. I would assume it would work that way as well, but havent tested it. Fixed-length encodings such as latin-1 are always more efficient in terms of CPU consumption. Also, I tried to change some tables from latin1 to utf8 but I got this error: "Speficief key was too long; max key length is 1000 bytes" Does anyone know the solution to this? So not supporting other scripts isn't just a big f*ck you to other cultures, but sticking to Latin-1 doesn't even allow you to write proper English. Does this mean that the data is actually proper utf8? My guess is it should be similar to the time it takes to duplicate (or export) a table. WebEach character set has a default collation. I have a table in utf8 with > 80M records and one of the columns (char(6) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL) can contain just latin symbols ([a-zA-Z0-9]). Hi @Guru! Copyright & Disclaimer. I recently stumbled across a major character encoding issue on one of the websites I run. Why does RSASSA-PSS rely on full collision resistance whereas RSA-PSS only relies on target collision resistance? (conversion does not fail). The script at the bottom of this post automates the conversion of any UTF-8 data stored in latin1 columns to proper UTF-8 columns. I wasnt asking for fixed width but MySQL/MEMORY made it so. I spent hours to find a way out of this encoding-hell! The script worked for me without any problems. (Yes, that's a MySQL idiosyncrasy.) How do I configure MySQL '5.1.49-1ubuntu8' to show multibyte characters? I am working on a site that I hope will be used globally. It found occurrences of Sao Paulo but not So Paulo. Thanks! How does Repercussion interact with Solphim, Mayhem Dominus? java/hibernate latin1 UTF-8 rotebhlstr DB cm90ZWL8aGxzdHI=rotebhlstr ^ character_set_server latin1 utf-8 SELECT 4 FROM subscribers WHERE 1 ORDER BY time_utc_str; (4 is cache buster). There is a trick to get around this: first convert the column character set to the binary character set, then from binary to utf8. Do not confuse, as you seem to do, between a character set and an encoding thereof. What is the difference between utf8mb4 and utf8 charsets in MySQL? They will be able to do more things (e.g. But as time goes by, things change. The UTF-8 encoding was designed to be backward-compatible with ASCII documents, for the first 128 characters. In other words, I consider the hash solution sub-standard, since we are risking a bug where data is detected as unique even though it doesn't already exist in the table. Just wanted to say thanks first! Learn more about Stack Overflow the company, and our products. The two-step process of temporarily converting to BINARY ensures that MySQL doesnt try to re-interpret the column in the other character encoding. WHERE CONVERT(MyColumn USING utf8) IS NULL You can also specify the character set youre using for client connections (via the command line, or through an API like PHPs mysql functions). so ive removed apex here $colDefault = DEFAULT {$col->COLUMN_DEFAULT}; @Luca I dont fully understand the difference youre pointing out. Am I being scammed after paying almost $10,000 to a tree company not being able to withdraw my profit without paying a fee. Almost always they are ascii, such as country_code, postal_code, UUID, hex, md5, etc. To calculate the number of bytes used to store a particular CHAR, Yes, text is really complicated, and Unicode won't hide that from you. Certification |
If the set of tokens in some fixed-length character set is known to be sufficient for your purpose at hand, and your purpose involves heavy and intensive string processing, with lots of LENGTH() and SUBSTR() stuff, then that could be a good reason for not using encodings such as UTF-8. If the sequence of bytes have an interpretation in certain charset, that is either the external system's or the application's domain, not the database's. This is because is the 1-byte hex F1 in latin1 or the 2-byte C3B1 for utf8. This 333 characters thing is confusing. However MySQL is different form Oracle for charset. all config files (apache, php and mysql) are well configured for latin1 by default. This script assumes you know you have UTF-8 characters in a latin1 column. Why are there different levels of MySQL collation/charsets? Thanks for the correction; Ive updated the text. Continuing on from preparation in our MySQL latin1 to utf8 migration let us first understand where MySQL uses character sets. April 28th, 2011 at 09:02 |, April 28th, 2011 at 20:43 |, August 28th, 2011 at 01:29 |, August 28th, 2011 at 01:45 |, December 30th, 2011 at 05:29 |, January 23rd, 2012 at 12:40 |, January 24th, 2012 at 10:33 |, January 28th, 2012 at 04:01 |, February 29th, 2012 at 20:44 |, February 29th, 2012 at 22:36 |, February 29th, 2012 at 23:17 |, February 29th, 2012 at 23:55 |, March 1st, 2012 at 00:33 |, March 18th, 2012 at 02:31 |, May 8th, 2012 at 10:59 |, May 16th, 2012 at 11:32 |, May 16th, 2012 at 23:50 |, June 18th, 2012 at 04:35 |, June 18th, 2012 at 05:42 |, August 17th, 2012 at 03:09 |, October 19th, 2012 at 10:31 |, October 27th, 2012 at 06:54 |, November 30th, 2012 at 02:35 |, January 19th, 2013 at 20:26 |, January 23rd, 2013 at 14:17 |, February 5th, 2013 at 19:06 |, February 21st, 2013 at 03:53 |, February 8th, 2016 at 09:16 |, June 6th, 2016 at 10:11 |, October 13th, 2017 at 01:51 |, May 27th, 2018 at 11:36 |, June 1st, 2018 at 04:25 |, September 4th, 2018 at 09:59 |, October 17th, 2018 at 18:50 |, October 20th, 2018 at 03:18 |, February 15th, 2019 at 00:24 |, February 17th, 2019 at 19:17 |, April 28th, 2019 at 23:05 |, April 30th, 2019 at 17:50 |, October 17th, 2019 at 11:18 |, December 6th, 2019 at 19:53 |, January 26th, 2021 at 18:09 |, January 31st, 2021 at 10:24 |, March 18th, 2022 at 18:38 |, May 10th, 2011 at 07:31 |, October 7th, 2011 at 09:49 |, October 7th, 2011 at 10:00 |, October 25th, 2011 at 12:25 |, October 26th, 2011 at 02:09 |, October 26th, 2011 at 02:16 |, October 26th, 2011 at 02:20 |, September 26th, 2012 at 22:19 |, July 7th, 2021 at 20:31 |. Particle Photon/Electron Remote Temperature and Humidity Logger, Forensic Tools for In-Depth Performance Investigations, Measuring the Performance of Single Page Applications, Measuring the Performance of Your Web Apps, Convert the column to the associated BINARY-type (ALTER TABLE MyTable MODIFY MyColumn BINARY), Convert the column back to the original type and set the character set to UTF-8 at the same time (ALTER TABLE MyTable MODIFY MyColumn TEXT CHARACTER SET utf8 COLLATE utf8_general_ci). Thanks, I think we both agree here. I couldn't approve more. Can a private person deceive a defendant to obtain evidence? It was utf8_general_ci before. Somehow Im not surprised. Actually I regret that in my own answer I completely overlooked the "human side", which in this issue might well be paramount. PTIJ Should we be afraid of Artificial Intelligence? At a bare minimum I would suggest using UTF-8. Your email address will not be published. When to use utf-8 and when to use latin1 in MySQL? Webjava,mysql,UTF8UTF-8ideaUTF-8JAVAutf-8web.xmlutf-8