On Unix systems – Linux and OS X included – file names can be arbitrary binary data with very few limitations. This means that in order to make sense of the name a character encoding must be used. Recently UTF-8 has become the default encoding on many systems, but sometimes you have to deal with …
Author Archives: Joni
Fixing Doubly UTF-8 Encoded Text in MySQL
Earlier I wrote about fixing UTF-8 encoded text stored in a latin1 column by converting it back to latin1. What if you want to convert the column to UTF-8 instead? Changing the storage encoding is easy to do, it takes just one ALTER TABLE statement and MySQL converts the column to UTF-8. But afterwards you …
Continue reading “Fixing Doubly UTF-8 Encoded Text in MySQL”
K-means Clustering in MySQL
Clustering is about finding data points that are grouped together. K-means clustering a fairly simple clustering algorithm. Here we’ll show how to do it in MySQL.
An Interesting Golden Ratio Identity
Lately I’ve been intrigued by the Fibonacci number sequence, i.e. the sequence where each number is the sum of the two previous.
Your Bash Prompt Needs This
Have you ever had this happen to you? You start a program and then interrupt it with Ctrl-C, and Bash prints its prompt after the ^C you have typed: prompt$ a very long command ^Cprompt$ â–ˆ Then you hit the Up key to retrieve very long command from the history and try to edit it, …