Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#51097 new defect (bug)

post cannot be saved due to certain variant of Japanese Kanji

Reported by: mogami74's profile mogami74 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.5
Component: Database Keywords: close
Focuses: Cc:

Description

When I would like to save draft, wordpress failed with error message "更新に失敗しました。 データベース内の投稿を更新できませんでした。" (i.e. could not update a post in database).

I figured out a variant of Kanji caused the problem. By mistake I used unordinary variant "𠮟責" instead of ordinary one "叱責". the unordinary one caused the trouble.

Change History (4)

#1 @SergeyBiryukov
4 years ago

  • Component changed from General to Database

#2 @ishitaka
4 years ago

@mogami74, Is the database charset utf8mb4?

"叱" is utf8 (3 bytes), "𠮟" is utf8mb4 (4 bytes).
If the database charset is utf8, the update will fail because "𠮟" cannot be saved.

#3 follow-up: @mogami74
4 years ago

  • Keywords close added

I checked the wp-config and found "define( 'DB_CHARSET', 'utf8' )".

Thank you for your suggestion, @ishitaka.

#4 in reply to: ↑ 3 @knutsp
4 years ago

Replying to mogami74:

I checked the wp-config and found "define( 'DB_CHARSET', 'utf8' )".

Thank you for your suggestion, @ishitaka.

The thing is the actual storage (and the selected collation that forces it) for each column in each table in the database. This can't be changed in wp-config, and AFAIK utf8 for the connection is equivalent to utf8mb4, because WordPress will then use ut48mb4. But WordPress will not change the storage and collation of data in the columns after they have been created. Tools like phpMyAdmin is what you need. Ask hosting provider.

Last edited 4 years ago by knutsp (previous) (diff)
Note: See TracTickets for help on using tickets.