Korean alphabet separation counting, len("foot") -> 3?, "foot" [0] -> "B"?

Asked 2 years ago, Updated 2 years ago, 39 views

Hi, everyone. I am inquiring because a strange phenomenon has occurred due to the recent change in the method of typing Korean on the parent site.

If you look at the bottom, it's the same letter "foot."

The "foot" copied from the parent site appears as 3 when you try len ("foot") on Python, and returns "foot" [0] = "b". On the other hand, the "foot" that I typed myself comes out as 1.

And the interesting thing is that I'm scratching data on a parent site, putting it in a DB, and searching for the data that went into the DB There is a problem that cannot be searched due to the above problem.

Please give us a lot of advice from those who are experiencing the same problem or know how to solve it. For reference, the encoding of the development environment is UTF-8, the development language is python, and the DB charset is set to utf-8mb4.

python web nfc

2022-09-20 21:55

1 Answers

In MacOS, the Korean file name is made into Korean with separate characters. So if you look at the file made by MacOS in Windows, it looks like Korean is separated.

Please refer to the link below.

https://lee-seul.github.io/python/2019/04/01/max-os-korean-character-issue.html


2022-09-20 21:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.