Daniel-Khodabakhsh / datetime-format

Gnome extension which allows users to customise the datetime format on the status bar and date menu.
GNU General Public License v3.0
30 stars 15 forks source link

Error: Failed to convert locale string to UTF8 #2

Open lovebdsobuj opened 7 years ago

lovebdsobuj commented 7 years ago

Thanks for this very Useful Extension. Generally this plugin works fine.

But after adding custom text in Bengali language, I got error When I click Datetime Format setting icon.

My Status bar datetime format string is: আজ %A, %d %B %Y - %I:%M:%S %p

Error: Failed to convert locale string to UTF8: Invalid byte sequence in conversion input

Stack trace:

  dateTimeFormat@/home/username/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/Utilities.js:15
  create/updatePreview@/home/username/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/FormatTarget.js:49
  create@/home/user/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/FormatTarget.js:55
  buildPrefsWidget/<@/home/username/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/prefs.js:136
  buildPrefsWidget@/home/username/.local/share/gnome-shell/extensions/datetime-format@Daniel-Khodabakhsh.github.com/prefs.js:136
  Application<._selectExtension@resource:///org/gnome/shell/extensionPrefs/main.js:90
  wrapper@resource:///org/gnome/gjs/modules/lang.js:178
  Application<._onCommandLine@resource:///org/gnome/shell/extensionPrefs/main.js:238
  wrapper@resource:///org/gnome/gjs/modules/lang.js:178
  main@resource:///org/gnome/shell/extensionPrefs/main.js:376
  @<main>:1
sirrahd commented 6 years ago

I created a pull request that fixes this issue. #5