From the course: Effective Serialization with Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Normalization

Normalization - Python Tutorial

From the course: Effective Serialization with Python

Start my 1-month free trial

Normalization

- You writing a search engine for bike tours in Europe. You encounter a curious bug while searching for tourists. Here is the city that the tour is defined on. And here is the query that the user is giving both of them in the city Koln in Germany. So let's run Ipython. I will use run magic to load both of these variables. And now we can look at them, city and query. And but when I try to compare them, they're not the same. With phase let's take a look at the length length city is four the length of the query is five. What happens is that in Unicode, some Compoints are not characters but control. If you look at City one, we see that there`s an o with an omelet on top of it. But if you look at query one, we see that it's a regular o and there's another character after it's saying add an omelet to the previous character. We have two ways to represent the same string With Unicode, this makes string equivalence not trivial. The…

Contents