Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to translate Chinese into Hanyu Pinyin under mysql

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

< LENGTH(NAME) DO SET tmp_lcode = SUBSTRING(NAME, lp, 2); SET lcode = CAST(ASCII(UNHEX(tmp_lcode)) AS UNSIGNED); SET tmp_rcode = SUBSTRING(NAME, lp + 2, 2); SET rcode = CAST(ASCII(UNHEX(tmp_rcode)) AS UNSIGNED); IF lcode >

128 THEN

SET mycode = 65536-lcode * 256-rcode

SELECT CONCAT (mypy,pin_yin_) INTO mypy FROM t_base_pinyin WHERE CODE_ > = ABS (mycode) ORDER BY CODE_ ASC LIMIT 1

SET lp = lp + 4

ELSE

SET mypy = CONCAT (mypy,CHAR (CAST (ASCII (UNHEX (SUBSTRING (NAME, lp, 2)) AS UNSIGNED)

SET lp = lp + 2

END IF

END WHILE

RETURN LOWER (mypy)

END

$

DELIMITER

-- Test function

Select to_pinyin (); select to_pinyin ()

Thank you for your reading. the above is the content of "how to translate Chinese into Hanyu Pinyin under mysql". After the study of this article, I believe you have a deeper understanding of how to translate Chinese into Hanyu Pinyin under mysql. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report