WWBN / AVideo

Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
https://avideo.tube/AVideo_OpenSource
Other
1.91k stars 973 forks source link

Japanese file name is garbled after Ubuntu update 18.04->20.04->22.04 #8136

Open hnagasawa opened 1 year ago

hnagasawa commented 1 year ago
  1. I run apt update under Bionic
  2. I run apt upgrade under Bionic
  3. I reboot AVideo server.
  4. All Avideo process stop.
  5. I run do-release-upgrade under Bionic no error update.
  6. I reboot AVideo server
  7. Scucess update form Bionic to Focal
  8. I run apt update under focal. All files latest.
  9. All Avideo process stop
  10. I run do-release-upgrade under focal no error update
  11. I reboot AVideo server
  12. Scucess update form focal to jimmy.
  13. I access AVideo.
  14. All video file names in Japanese are displayed as garbled characters. Pleaase attached jpeg file

AVideo plays the video normally.

Avideo Version 12.4 AVideo encoder 4.0 mysql version mysql Ver 8.0.33-0ubuntu0.22.04.2 for Linux on x86_64 ((Ubuntu)) php version PHP 8.2.7 (cli) (built: Jun 8 2023 15:27:40) (NTS) Apache Server version: Apache/2.4.52 (Ubuntu) Server built: 2023-03-01T22:43:55

Which file do I check ? avideoproblem

DanielnetoDotCom commented 1 year ago

you may need to google for that, I have never seen anything like this

Maikuolan commented 1 year ago

Looks like an encoding problem.

The ANSI bytes, "富士山Y", as UTF-8 (Unicode), would encode as "富士山Y" (I'm guessing, the video is something about Mt. Fuji..?), so, I'm assuming that, for some reason, the filenames are being interpreted as ANSI instead of UTF-8. As for the reason why..? No idea.

hnagasawa commented 1 year ago

This issue ocured Firefox and dhrome and Edge. php,apache2,mysql which encoding issue do you think?

hnagasawa commented 1 year ago

To:Mr. Maikuolan

I'm guessing, the video is something about Mt. Fuji..? Yes. 富士山=Mt.Fuji

Maikuolan commented 1 year ago

Usually, when I see something like this happening at a website, I would suggest checking the "charset" specified by the page's HTML, to confirm whether it looks something like this, or like something different:

<head>
  <meta charset="UTF-8">
...
</head>

But, in this case, doing that probably won't help, I think. If the "charset" specified by the page's HTML was incorrect, e.g., ANSI instead of UTF-8, I would expect the problem to occur everywhere on the page, rather than occurring for just the video titles only, and, although we see this problem occurring for video titles, we can see there are Japanese characters appearing correctly elsewhere on the page (the download button, the status message at the top of the page, etc). So, the problem affects video titles, but not the entire page. Which is a bit strange.

Maybe check the table collation for the MySQL database, to ensure that nothing unexpected has happened (e.g., the update process somehow changing it to an incorrect collation)? I'm not certain whether that's the problem, but hypothetically, if such a thing were to happen, I wonder whether perhaps that could result in the problem we're seeing here (i.e., the video titles were saved as UTF-8 in the database, but then the table collation was changed to ANSI without any of the titles being updated, then, because MySQL now mistakenly thinks the titles are ANSI, when AVideo submits SQL queries to MySQL, MySQL translates the ANSI representation of those characters back to UTF-8 before serving the results for those SQL queries, so we end up with these wrong titles appearing at the page). This is only speculation though. If, when checking the table collation, the table collation appears to be correct, then the cause is probably something else.

I doubt the browser would be responsible. Regardless of whether using Edge, Chrome, or Firefox, similarly as with the incorrect "charset" idea mentioned above, if there was something wrong with the browser, I would expect the problem to affect the entire page, but instead, we see it only affecting the video titles.

hnagasawa commented 1 year ago

I cheked Mysql result next root@youphptube-Express5800-S70-N81.txt I google. next URL found https://stackoverflow.com/questions/1344692/fixing-broken-utf-8-encoding

Apparently, this garbled character seems to be caused by double encoding with UTF-8.

Apparently, this garbled character seems to be caused by double encoding with UTF-8. Assuming this is correct, please tell me which table in which database is related to AVideo and AVideo-Enconder.

hnagasawa commented 1 year ago

I tried https://stackoverflow.com/questions/1344692/fixing-broken-utf-8-encoding But same issue occure.

Maikuolan commented 1 year ago

Sorry for the delayed reply.

Apparently, this garbled character seems to be caused by double encoding with UTF-8.

I think that's the case.

please tell me which table in which database is related to AVideo and AVideo-Enconder.

@DanielnetoDotCom You're much more familiar than me regarding AVideo's database structure. Any idea, or thoughts on it?

DanielnetoDotCom commented 1 year ago

this issue is specific to your infrastructure. I am not sure how to fix it.

the only way I can see is for you to hire me so I can look directly into your server..