0

I have imported a database which includes Hebrew. The Hebrew in the database looks like this: קירורית ל 4 פחיות מבית ×מגזית

I tried to change the encoding to UTF-8 but it still looks the same.

How can I fix this?

If any more information needed tell me and I'll provide.

Thanks.

Omer
  • 1
  • 4
  • I think you will need to change the database encoding to UTF-8 and _also_ reimport your Hebrew data. This is because information may have been lost/truncated when you incorrectly imported the Hebrew text the first time around, using the wrong encoding. – Tim Biegeleisen Oct 08 '18 at 05:10
  • Possible duplicate of [UTF-8 all the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Martin Zeitler Oct 08 '18 at 05:14
  • it can be represented with `UTF-8` - so one can have Latin & Iwrith letters, at the same time (hint: you need to use `UTF-8` encoding for the script files, too). – Martin Zeitler Oct 08 '18 at 05:15

1 Answers1

0

That's "Mojibake" for something close to קירורית ל 4 פחיות מבית �מגזי, correct?

See Trouble with UTF-8 characters; what I see is not what I stored for the cause, to wit:

  • The bytes to be stored need to be UTF-8-encoded. Fix this.
  • The connection when INSERTing and SELECTing text needs to specify utf8 or utf8mb4. Fix this.
  • The column needs to be declared CHARACTER SET utf8 (or utf8mb4). Fix this.
  • HTML should start with .

The appropriate fix for the data is here: http://mysql.rjweb.org/doc.php/charcoll#fixes_for_various_cases

Rick James
  • 135,179
  • 13
  • 127
  • 222
  • Is there a php function which converts it back to the original data? – Omer Oct 10 '18 at 06:18
  • @Omer - There may be, but I would prefer to stay in MySQL. Look around, there are lots of questions that ask about PHP/Java/etc solutions, but many of them failed. – Rick James Oct 10 '18 at 16:00