In a Rails controller, I'd like to compute an i18n message to be sent to front-end. I proceed as follow:

```
flash[:notice] = I18n.t 'programs.update.program_saved'

```

In my translation file (fr.yml), the translation is the following one: '**Programme sauvegardé**'.

When setting a breakpoint on this line, and then typing it in my console, I have encoding issues:

```
0> I18n.t 'programs.update.program_saved'
=> "Programme sauvegardÃ©"

```

I have implemented the [AJAX pattern](https://minhajuddin.com/2014/03/12/show-rails-flash-messages-in-jquery-ajax-requests/) to handle flash messages, and on the front side, I can see the same encoding issue.

Apart from that, when I type the same thing in a `rails console`, I have no encoding issue.

I'm in `Ruby 2.4.4` and `Rails 5.2.1`.

What can cause this encoding issue, and how to get rid of it?

**EDIT: Add additional details**

I develop using `RubyMine 2018.2`. My rails server is running under a `WSL (Windows Subsystem for Linux)` with an `Ubuntu 16`. I run my rails server from RubyMine, from `Windows` side. The `rails SDK` that is used is a `Linux` one. The `rails server` runs on `Linux` side.

The oigin of my problem was encoding issues in my browser, when showing flash messages set in HTTP request response. These flash message are computed as explained, i.e.: `I18n.t 'programs.update.program_saved'`.

The problem is the same when I launch my rails server from my RubyMine, or directly from Linux terminal.

To investigate, I wanted to debug and use the RubyMine console. When executing this command from RubyMine debugger console, there still were encoding issues: `I18n.t 'programs.update.program_saved'`. When doing it from `rails console` in `Linux` or `Windows` (in `RubyMine`, the rails console executes on `Linux` side), I have no encoding issue.

Furthermore, the issue is still present when running the app on a heroku instance, so I'm wondering whether this is related to my local config or not.