Posts

Showing posts with the label utf-8

Carrierwave: Encoding::UndefinedConversionError (“xFF” from ASCII-8BIT to UTF-8)

Image
Clash Royale CLAN TAG #URR8PPP Carrierwave: Encoding::UndefinedConversionError (“xFF” from ASCII-8BIT to UTF-8) I'm trying to upload multiple files to a record called Post , with a json attribute called images , using Carrierwave. But when I try to save the record, I get this error: Post images (0.5ms) ROLLBACK Completed 401 Unauthorized in 15ms (ActiveRecord: 0.8ms) Encoding::UndefinedConversionError ("xFF" from ASCII-8BIT to UTF-8): I've used Carrierwave before and I never got this error. I checked if anyone's had this problem, before, and I didn't find much. This question suggested the activesupport-json_encoder gem, but this gem isn't compatible with Rails 5. Also suggested were the force_encoding method and using a "wb" flag when saving the file, but the Carrierwave code has no place to implement those suggestions. activesupport-json_encoder force_encoding Here's the code I have: form <%= form_for @post, :html => {multipart: t...

How can i give input bengali or Unicode languages in tkinter python

Image
Clash Royale CLAN TAG #URR8PPP How can i give input bengali or Unicode languages in tkinter python I am beginner in GUI platform in python.I tr to Create a text box , but when i input other language except English specially Bengali it shows ??. Can anyone help me out . I attach my code and sample output try: from tkinter import * import sys except ImportError: from tkinter import * import sys class App(object): def __init__(self,parent): self.frame1 = Frame(parent, highlightbackground="green", highlightcolor="#666D00", highlightthickness=7, width=700, height=700, bd= 10) self.frame1.pack() self.frame1.pack_propagate(False) parent.geometry("700x700") parent.resizable(0, 0) self.frame1.configure(background='white') self.text1 = Label(text="আপনার অনুচ্ছেদ পূরণ করুন (বাংলা):",font=("Lohit Bengali", 16)) self.text1.place(x=110, y=100) self.T ...