# Parsing UTF-8 URLs in Ruby with the Addressable Gem

DevFeed: [Parsing UTF-8 URLs in Ruby with the Addressable Gem](<https://devfeed.tech/articles/die-uri-parse-die-long-live-the-zen-of-addressable-28312.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/ruby/2020/05/12/die-uri-parse-die-long-live-the-zen-of-addressable.html>)

Author: Fuzzygroup

Published: 2020-05-12T00:00:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Library](<https://devfeed.tech/topics/library.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>)

Tags: [library](<https://devfeed.tech/tags/library.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

## AI overview

The article explains that Ruby's URI.parse does not handle URLs containing UTF-8 characters as expected and demonstrates using the Addressable gem instead, including a Gemfile entry and parsing example.

## Source excerpt

URI.parse is a Ruby call I've written a thousand plus times. The unfortunate reality of URI.parse is that it doesn't work when there are UTF-8 characters in the url. The work around is the addressable gem. So: Gemfile gem "addressable" Example Usage require 'addressable/uri' url = 'http://www.example.com/wp content/uploads/2012/01/München.jpg' parts = Addressable::URI.parse(url) Sources [Stack Overflow] (https://stackoverflow.com/questions/9082732/how-can-i-extract-a-url-with-non-english-characters-from-a-string) Home Page Shoutout I can't even think about URL parsing in Ruby / Elixir / JavaScript without mentioning Gamache's FuzzyUrl library. Highly, highly recommenderd.